@atlaskit/editor-common 125.3.0 → 126.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/afm-products/tsconfig.json +3 -0
- package/dist/cjs/analytics/types/enums.js +3 -0
- package/dist/cjs/extensions/buildMenuItem.js +6 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.compiled.css +0 -1
- package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +22 -28
- package/dist/cjs/quick-insert/QuickInsertHoverPreview.compiled.css +42 -1
- package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +147 -68
- package/dist/cjs/quick-insert/QuickInsertMenuItem.js +4 -0
- package/dist/cjs/quick-insert/QuickInsertMenuSection.js +11 -4
- package/dist/cjs/quick-insert/confluence-attribution-icon.js +18 -0
- package/dist/cjs/quick-insert/jira-attribution-icon.js +18 -0
- package/dist/cjs/quick-insert/messages.js +30 -0
- package/dist/cjs/quick-insert/preview.js +5 -0
- package/dist/cjs/quick-insert/snippetPreviewImageUrls.js +43 -43
- package/dist/cjs/quick-insert/use-menu-list-height.js +58 -0
- package/dist/cjs/quick-insert/use-menu-popup-sizing.js +60 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Mention/mention-with-profilecard.js +8 -0
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +2 -0
- package/dist/es2019/analytics/types/enums.js +3 -0
- package/dist/es2019/extensions/buildMenuItem.js +5 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.compiled.css +0 -1
- package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +20 -29
- package/dist/es2019/quick-insert/QuickInsertHoverPreview.compiled.css +42 -1
- package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +130 -55
- package/dist/es2019/quick-insert/QuickInsertMenuItem.js +4 -0
- package/dist/es2019/quick-insert/QuickInsertMenuSection.js +11 -4
- package/dist/es2019/quick-insert/confluence-attribution-icon.js +10 -0
- package/dist/es2019/quick-insert/jira-attribution-icon.js +10 -0
- package/dist/es2019/quick-insert/messages.js +30 -0
- package/dist/es2019/quick-insert/preview.js +1 -0
- package/dist/es2019/quick-insert/snippetPreviewImageUrls.js +43 -43
- package/dist/es2019/quick-insert/use-menu-list-height.js +37 -0
- package/dist/es2019/quick-insert/use-menu-popup-sizing.js +49 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Mention/mention-with-profilecard.js +8 -0
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +3 -0
- package/dist/esm/analytics/types/enums.js +3 -0
- package/dist/esm/extensions/buildMenuItem.js +6 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/CompactQuickInsertMenuItem.compiled.css +0 -1
- package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +23 -29
- package/dist/esm/quick-insert/QuickInsertHoverPreview.compiled.css +42 -1
- package/dist/esm/quick-insert/QuickInsertHoverPreview.js +150 -68
- package/dist/esm/quick-insert/QuickInsertMenuItem.js +4 -0
- package/dist/esm/quick-insert/QuickInsertMenuSection.js +11 -4
- package/dist/esm/quick-insert/confluence-attribution-icon.js +12 -0
- package/dist/esm/quick-insert/jira-attribution-icon.js +12 -0
- package/dist/esm/quick-insert/messages.js +30 -0
- package/dist/esm/quick-insert/preview.js +1 -0
- package/dist/esm/quick-insert/snippetPreviewImageUrls.js +43 -43
- package/dist/esm/quick-insert/use-menu-list-height.js +51 -0
- package/dist/esm/quick-insert/use-menu-popup-sizing.js +53 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Mention/mention-with-profilecard.js +8 -0
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +3 -0
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/analytics/types/ai-suggestions-events.d.ts +28 -2
- package/dist/types/analytics/types/enums.d.ts +3 -0
- package/dist/types/extensions/types/extension-manifest.d.ts +5 -0
- package/dist/types/extensions/types/utils.d.ts +2 -0
- package/dist/types/provider-factory/profile-card-provider.d.ts +14 -1
- package/dist/types/provider-factory/quick-insert-provider.d.ts +3 -0
- package/dist/types/quick-insert/CompactQuickInsertMenuItem.d.ts +1 -1
- package/dist/types/quick-insert/QuickInsertHoverPreview.d.ts +7 -6
- package/dist/types/quick-insert/QuickInsertMenuItem.d.ts +7 -2
- package/dist/types/quick-insert/confluence-attribution-icon.d.ts +3 -0
- package/dist/types/quick-insert/jira-attribution-icon.d.ts +3 -0
- package/dist/types/quick-insert/messages.d.ts +5 -2
- package/dist/types/quick-insert/preview.d.ts +16 -0
- package/dist/types/quick-insert/use-menu-list-height.d.ts +6 -0
- package/dist/types/quick-insert/use-menu-popup-sizing.d.ts +11 -0
- package/package.json +4 -3
- package/quick-insert/confluence-attribution-icon/package.json +10 -0
- package/quick-insert/jira-attribution-icon/package.json +10 -0
- package/quick-insert/preview/package.json +10 -0
- package/quick-insert/use-menu-list-height/package.json +10 -0
- package/quick-insert/use-menu-popup-sizing/package.json +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 126.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f502381f5d221`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f502381f5d221) -
|
|
8
|
+
Complete AI Suggestions analytics for right-rail lifecycle, empty-state interactions,
|
|
9
|
+
cancellation, suggestion lifecycle and source context, agent attribution, and aggregate
|
|
10
|
+
discard-all actions.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 125.4.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [`a034f535638cc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a034f535638cc) -
|
|
21
|
+
Add structured Quick Insert previews with localised title, description and attribution under
|
|
22
|
+
platform_editor_slash_command.
|
|
23
|
+
|
|
24
|
+
Exclude footer and category navigation actions from previews. Left-align attribution, use subtle
|
|
25
|
+
title and attribution text, and default description text.
|
|
26
|
+
|
|
27
|
+
Show text previews even without preview metadata, and reserve a fixed image area while images load
|
|
28
|
+
or when they fail. Keep previews within the viewport, flipping left when needed, with compact
|
|
29
|
+
panel dimensions and typography.
|
|
30
|
+
|
|
31
|
+
Replace baked panel screenshots with image-only assets. Remove image fields from text-only legacy
|
|
32
|
+
previews while preserving their attribution.
|
|
33
|
+
|
|
34
|
+
Let extension providers own their preview images and attribution. Pass preview metadata through
|
|
35
|
+
the Company Hub manifest factory and remove Editor's fallback preview registry.
|
|
36
|
+
|
|
37
|
+
Localize provider attribution names and display Confluence and Jira product icons instead of the
|
|
38
|
+
attribution prefix when an icon is present. Allow the Dropbox manifest to receive the host's
|
|
39
|
+
message formatter.
|
|
40
|
+
|
|
41
|
+
- [`7306003a7565b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7306003a7565b) -
|
|
42
|
+
Add shared measured list and adaptive popup sizing helpers, and align category heading spacing for
|
|
43
|
+
platform_editor_slash_command.
|
|
44
|
+
- [`f5ec508f7f5ba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f5ec508f7f5ba) -
|
|
45
|
+
Add an optional `renderAgentMentionCard` render-prop to `ProfilecardProvider`, gated behind
|
|
46
|
+
`platform_editor_agent_profile_card_update`. This lets 1P products inject
|
|
47
|
+
`@atlassian/agent-profile-card` for agent mentions in the editor and renderer, while public editor
|
|
48
|
+
consumers and products that haven't wired the hook keep the existing `@atlaskit/profilecard` agent
|
|
49
|
+
card.
|
|
50
|
+
|
|
51
|
+
Widen `@atlassian/agent-profile-card`'s `onChatClick` to also receive the Studio agent ID, and add
|
|
52
|
+
an `isReadOnly` prop that suppresses the card's chat button, dropdown and favourite star.
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Updated dependencies
|
|
57
|
+
|
|
3
58
|
## 125.3.0
|
|
4
59
|
|
|
5
60
|
### Minor Changes
|
|
@@ -103,6 +103,9 @@
|
|
|
103
103
|
{
|
|
104
104
|
"path": "../../../linking-platform/link-picker/afm-products/tsconfig.json"
|
|
105
105
|
},
|
|
106
|
+
{
|
|
107
|
+
"path": "../../../design-system/logo/afm-products/tsconfig.json"
|
|
108
|
+
},
|
|
106
109
|
{
|
|
107
110
|
"path": "../../../media/media-card/afm-products/tsconfig.json"
|
|
108
111
|
},
|
|
@@ -43,6 +43,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
43
43
|
ACTION["DEACTIVATED"] = "deactivated";
|
|
44
44
|
ACTION["DECREMENTED"] = "decremented";
|
|
45
45
|
ACTION["DELETED"] = "deleted";
|
|
46
|
+
ACTION["DISCARD_ALL"] = "discardAll";
|
|
46
47
|
ACTION["DISCARDED_INVALID_STEPS_FROM_TRANSACTION"] = "discardedInvalidStepsFromTransaction";
|
|
47
48
|
ACTION["DISCARDED"] = "discarded";
|
|
48
49
|
/** used in @atlassian/editor-referentiality */
|
|
@@ -66,6 +67,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
66
67
|
ACTION["ENTERED"] = "entered";
|
|
67
68
|
ACTION["ERROR"] = "error";
|
|
68
69
|
ACTION["ERRORED"] = "errored";
|
|
70
|
+
ACTION["EMPTY_STATE_EXPOSED"] = "emptyStateExposed";
|
|
69
71
|
ACTION["EXPERIENCE_MEASURED"] = "experienceMeasured";
|
|
70
72
|
ACTION["EXPERIENCE_SAMPLED"] = "experienceSampled";
|
|
71
73
|
ACTION["EXPOSED"] = "exposed";
|
|
@@ -122,6 +124,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
122
124
|
ACTION["REFERENCE_SYNCED_BLOCK_UPDATE"] = "referenceSyncedBlockUpdate";
|
|
123
125
|
ACTION["REFERENCE_SYNCED_BLOCK_UNSYNC"] = "referenceSyncedBlockUnsync";
|
|
124
126
|
ACTION["REFERENCE_SYNCED_BLOCK_COPY"] = "referenceSyncedBlockCopy";
|
|
127
|
+
ACTION["RIGHT_RAIL_CLOSED"] = "rightRailClosed";
|
|
125
128
|
ACTION["RIGHT_RAIL_VIEWED"] = "rightRailViewed";
|
|
126
129
|
ACTION["REPLACED_ALL"] = "replacedAll";
|
|
127
130
|
ACTION["REPLACED_ONE"] = "replacedOne";
|
|
@@ -11,15 +11,16 @@ var _manifestHelpers = require("./manifest-helpers");
|
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
function buildMenuItem(manifest, extensionModule) {
|
|
14
|
-
var _extensionModule$cate, _ref, _extensionModule$app;
|
|
14
|
+
var _extensionModule$prev, _extensionModule$cate, _ref, _extensionModule$app;
|
|
15
15
|
var title = extensionModule.title || manifest.title;
|
|
16
16
|
var key = "".concat(manifest.key, ":").concat(extensionModule.key);
|
|
17
17
|
var node = (0, _manifestHelpers.buildAction)(extensionModule.action, manifest);
|
|
18
|
+
var preview = (_extensionModule$prev = extensionModule.preview) !== null && _extensionModule$prev !== void 0 ? _extensionModule$prev : manifest.preview;
|
|
18
19
|
var category = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_command') ? (_extensionModule$cate = extensionModule.category) !== null && _extensionModule$cate !== void 0 ? _extensionModule$cate : manifest.category : undefined;
|
|
19
20
|
if (!node) {
|
|
20
21
|
throw new Error("Couldn't find any action for ".concat(title, " (").concat(key, ")"));
|
|
21
22
|
}
|
|
22
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_app_category_analytics') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_command') ? {
|
|
23
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_app_category_analytics') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_command') ? {
|
|
23
24
|
app: (_ref = (_extensionModule$app = extensionModule.app) !== null && _extensionModule$app !== void 0 ? _extensionModule$app : manifest.app) !== null && _ref !== void 0 ? _ref : {
|
|
24
25
|
key: manifest.key
|
|
25
26
|
}
|
|
@@ -38,7 +39,9 @@ function buildMenuItem(manifest, extensionModule) {
|
|
|
38
39
|
summary: manifest.summary,
|
|
39
40
|
documentationUrl: manifest.documentationUrl,
|
|
40
41
|
priority: extensionModule.priority
|
|
41
|
-
},
|
|
42
|
+
}, preview != null && {
|
|
43
|
+
preview: preview
|
|
44
|
+
}), extensionModule.lozenge != null && {
|
|
42
45
|
lozenge: extensionModule.lozenge
|
|
43
46
|
}), {}, {
|
|
44
47
|
icon: extensionModule.icon || manifest.icons['48'],
|
|
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
27
27
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
28
28
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
29
29
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
30
|
-
var packageVersion = "125.
|
|
30
|
+
var packageVersion = "125.4.0";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
3
3
|
._2rko1mok{border-radius:var(--ds-radius-large,8px)}
|
|
4
|
-
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
5
4
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
6
5
|
._18zr1b66{padding-inline:var(--ds-space-050,4px)}
|
|
7
6
|
._1dqonqa1{border-style:solid}
|
|
@@ -11,8 +11,6 @@ require("./CompactQuickInsertMenuItem.compiled.css");
|
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var _buttonItem = _interopRequireDefault(require("@atlaskit/menu/button-item"));
|
|
15
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
16
14
|
var _primitives = require("@atlaskit/primitives");
|
|
17
15
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
16
|
var _QuickInsertHoverPreview = require("./QuickInsertHoverPreview");
|
|
@@ -23,7 +21,6 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
23
21
|
var styles = {
|
|
24
22
|
iconContainer: "_4cvr1h6o _1e0c1txw _1o9zidpf _1bah1h6o _1tke1tcg _1ul91tcg",
|
|
25
23
|
content: "_16jlkb7n _1o9zkb7n _i0dlidpf _1ul9idpf",
|
|
26
|
-
icon: "_2rko1qi0 _1reo15vq _18m915vq _1h6d1l7x _1dqonqa1 _189ee4h9 _4cvr1h6o _bfhk1bhr _1e0c1txw _4t3izwfg _1bah1h6o _1bsbzwfg",
|
|
27
24
|
iconLarge: "_2rko1mok _1reo15vq _18m915vq _1h6d1l7x _1dqonqa1 _189ee4h9 _4cvr1h6o _bfhk1bhr _1e0c1txw _4t3izwfg _1bah1h6o _1bsbzwfg",
|
|
28
25
|
shortcut: "_2rko12b0 _11c8wadc _1rjcv77o _18zr1b66 _bfhki8nm _syazazsu"
|
|
29
26
|
};
|
|
@@ -81,12 +78,17 @@ var disabledItemStyles = (0, _primitives.xcss)({
|
|
|
81
78
|
width: '100%'
|
|
82
79
|
});
|
|
83
80
|
var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref) {
|
|
81
|
+
var _ref3, _resolvedPreview$imag, _resolvedPreview$imag2, _resolvedPreview$attr;
|
|
84
82
|
var ariaLabel = _ref.ariaLabel,
|
|
83
|
+
description = _ref.description,
|
|
85
84
|
iconBefore = _ref.iconBefore,
|
|
86
85
|
isDisabled = _ref.isDisabled,
|
|
87
86
|
onSelect = _ref.onSelect,
|
|
87
|
+
preview = _ref.preview,
|
|
88
88
|
previewImageUrls = _ref.previewImageUrls,
|
|
89
89
|
shortcut = _ref.shortcut,
|
|
90
|
+
_ref$shouldShowPrevie = _ref.shouldShowPreview,
|
|
91
|
+
shouldShowPreview = _ref$shouldShowPrevie === void 0 ? true : _ref$shouldShowPrevie,
|
|
90
92
|
_ref$shouldWrapIcon = _ref.shouldWrapIcon,
|
|
91
93
|
shouldWrapIcon = _ref$shouldWrapIcon === void 0 ? true : _ref$shouldWrapIcon,
|
|
92
94
|
title = _ref.title;
|
|
@@ -98,38 +100,27 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
|
|
|
98
100
|
},
|
|
99
101
|
id = _ref2.id,
|
|
100
102
|
isSelected = _ref2.isSelected;
|
|
103
|
+
var resolvedDescription = description !== null && description !== void 0 ? description : item === null || item === void 0 ? void 0 : item.description;
|
|
104
|
+
var previewId = (0, _react.useId)();
|
|
101
105
|
var handleClick = (0, _quickInsertMenuItemUtils.useQuickInsertMenuItemSelection)(onSelect);
|
|
102
106
|
var _useState = (0, _react.useState)(null),
|
|
103
107
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
104
108
|
referenceElement = _useState2[0],
|
|
105
109
|
setReferenceElement = _useState2[1];
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
iconBefore: _wrappedIcon,
|
|
114
|
-
id: id,
|
|
115
|
-
isDisabled: isDisabled,
|
|
116
|
-
isSelected: isSelected,
|
|
117
|
-
onClick: handleClick,
|
|
118
|
-
role: "option"
|
|
119
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
120
|
-
alignBlock: "center",
|
|
121
|
-
spread: "space-between"
|
|
122
|
-
}, /*#__PURE__*/_react.default.createElement(_compiled.Text, null, title), shortcut && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
123
|
-
as: "span",
|
|
124
|
-
xcss: styles.shortcut
|
|
125
|
-
}, shortcut)));
|
|
126
|
-
}
|
|
110
|
+
var resolvedPreview = (0, _react.useMemo)(function () {
|
|
111
|
+
return preview !== null && preview !== void 0 ? preview : previewImageUrls ? {
|
|
112
|
+
image: previewImageUrls
|
|
113
|
+
} : {};
|
|
114
|
+
}, [preview, previewImageUrls]);
|
|
115
|
+
var shouldRenderPreview = shouldShowPreview && isSelected && !isDisabled;
|
|
116
|
+
var hasAccessiblePreview = Boolean(resolvedDescription || (resolvedPreview === null || resolvedPreview === void 0 ? void 0 : resolvedPreview.attribution));
|
|
127
117
|
var wrappedIcon = iconBefore && shouldWrapIcon ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
128
118
|
xcss: styles.iconLarge
|
|
129
119
|
}, iconBefore) : iconBefore;
|
|
130
120
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
131
121
|
ref: setReferenceElement,
|
|
132
122
|
"aria-label": ariaLabel,
|
|
123
|
+
"aria-describedby": shouldRenderPreview && hasAccessiblePreview ? previewId : undefined,
|
|
133
124
|
"aria-selected": isSelected,
|
|
134
125
|
id: id,
|
|
135
126
|
isDisabled: isDisabled,
|
|
@@ -145,9 +136,12 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
|
|
|
145
136
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Text, null, title), shortcut && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
146
137
|
as: "span",
|
|
147
138
|
xcss: styles.shortcut
|
|
148
|
-
}, shortcut))),
|
|
149
|
-
key:
|
|
150
|
-
|
|
151
|
-
|
|
139
|
+
}, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/_react.default.createElement(_QuickInsertHoverPreview.QuickInsertHoverPreview, {
|
|
140
|
+
key: (_ref3 = (_resolvedPreview$imag = (_resolvedPreview$imag2 = resolvedPreview.image) === null || _resolvedPreview$imag2 === void 0 ? void 0 : _resolvedPreview$imag2.light) !== null && _resolvedPreview$imag !== void 0 ? _resolvedPreview$imag : (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name) !== null && _ref3 !== void 0 ? _ref3 : title,
|
|
141
|
+
id: previewId,
|
|
142
|
+
description: resolvedDescription,
|
|
143
|
+
preview: resolvedPreview,
|
|
144
|
+
referenceElement: referenceElement,
|
|
145
|
+
title: title
|
|
152
146
|
}));
|
|
153
147
|
};
|
|
@@ -1,4 +1,45 @@
|
|
|
1
|
+
._11c81qyo{font:var(--ds-font-heading-xsmall,normal 653 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
|
+
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
4
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
|
+
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
6
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
7
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
8
|
+
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
9
|
+
._1rjcutpp{padding-block:var(--ds-space-150,9pt)}
|
|
10
|
+
._16jlidpf{flex-grow:0}
|
|
11
|
+
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
12
|
+
._18m915vq{overflow-y:hidden}
|
|
13
|
+
._1bah1h6o{justify-content:center}
|
|
14
|
+
._1bsb1osq{width:100%}
|
|
15
|
+
._1bsb7vkz{width:1pc}
|
|
16
|
+
._1bsbncxg{width:264px}
|
|
17
|
+
._1bsbp3fh{width:15pc}
|
|
18
|
+
._1e0c1txw{display:flex}
|
|
1
19
|
._1e0c1ule{display:block}
|
|
20
|
+
._1e0ccj1k{display:-webkit-box}
|
|
21
|
+
._1i4qfg65{overflow-wrap:anywhere}
|
|
22
|
+
._1o9zidpf{flex-shrink:0}
|
|
2
23
|
._1pby16oo{z-index:510}
|
|
24
|
+
._1reo15vq{overflow-x:hidden}
|
|
25
|
+
._1yyjcs5v{-webkit-line-clamp:2}
|
|
26
|
+
._1yyjegat{-webkit-line-clamp:4}
|
|
27
|
+
._2lx21bp4{flex-direction:column}
|
|
3
28
|
._3um015vq{visibility:hidden}
|
|
4
|
-
.
|
|
29
|
+
._4cvr1h6o{align-items:center}
|
|
30
|
+
._4t3i1osq{height:100%}
|
|
31
|
+
._4t3i68cl{height:90pt}
|
|
32
|
+
._4t3i7vkz{height:1pc}
|
|
33
|
+
._5ral1f51{object-fit:contain}
|
|
34
|
+
._6rthu2gc{margin-block-end:var(--ds-space-100,8px)}
|
|
35
|
+
._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
|
|
36
|
+
._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
|
|
37
|
+
._c71l1kw7{max-height:inherit}
|
|
38
|
+
._c71lk6is{max-height:calc(100vh - 1pc)}
|
|
39
|
+
._i0dlexct{flex-basis:16px}
|
|
40
|
+
._p12f1oec{max-width:calc(100vw - 1pc)}
|
|
41
|
+
._p12f1osq{max-width:100%}
|
|
42
|
+
._sudp1e54{-webkit-box-orient:vertical}
|
|
43
|
+
._syazazsu{color:var(--ds-text-subtle,#505258)}
|
|
44
|
+
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
45
|
+
._vchhusvi{box-sizing:border-box}
|
|
@@ -11,93 +11,172 @@ require("./QuickInsertHoverPreview.compiled.css");
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
15
|
var _reactDom = require("react-dom");
|
|
17
|
-
var
|
|
16
|
+
var _reactIntl = require("react-intl");
|
|
17
|
+
var _reactPopper = require("@atlaskit/popper/react-popper");
|
|
18
|
+
var _text = require("@atlaskit/primitives/compiled/text");
|
|
18
19
|
var _useThemeObserver2 = require("@atlaskit/tokens/use-theme-observer");
|
|
20
|
+
var _messages = require("./messages");
|
|
19
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var PREVIEW_WIDTH = 294;
|
|
23
|
-
var PREVIEW_OFFSET = [-4, 4];
|
|
22
|
+
// Viewport calculations and multiline clamping require styles outside @atlaskit/css's schema.
|
|
23
|
+
// Viewport clamping requires modifiers, which the top-layer adapter does not support.
|
|
24
24
|
var PREVIEW_MODIFIERS = [{
|
|
25
|
+
name: 'offset',
|
|
26
|
+
options: {
|
|
27
|
+
offset: [0, 4]
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
name: 'flip',
|
|
31
|
+
options: {
|
|
32
|
+
fallbackPlacements: ['left-start'],
|
|
33
|
+
// Choose the side by horizontal space; vertical overflow is shifted into view.
|
|
34
|
+
altAxis: false,
|
|
35
|
+
padding: 8,
|
|
36
|
+
rootBoundary: 'viewport'
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
25
39
|
name: 'preventOverflow',
|
|
26
40
|
options: {
|
|
27
|
-
mainAxis:
|
|
41
|
+
mainAxis: true,
|
|
42
|
+
altAxis: true,
|
|
43
|
+
tether: false,
|
|
44
|
+
padding: 8,
|
|
45
|
+
rootBoundary: 'viewport'
|
|
28
46
|
}
|
|
29
47
|
}];
|
|
30
48
|
var styles = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
49
|
+
positioner: "_c71lk6is _p12f1oec _1pby16oo",
|
|
50
|
+
panel: "_2rko1qi0 _1reo15vq _18m915vq _1rjcutpp _18zrutpp _vchhusvi _bfhk1bhr _16qs130s _c71l1kw7 _p12f1osq _1bsbncxg",
|
|
51
|
+
content: "_zulpu2gc _1e0c1txw _2lx21bp4",
|
|
52
|
+
title: "_11c81qyo _1reo15vq _18m915vq _syazazsu _1i4qfg65 _1e0ccj1k _sudp1e54 _1yyjcs5v",
|
|
53
|
+
description: "_11c8fhey _1reo15vq _18m915vq _syazi7uo _1e0ccj1k _1i4qfg65 _sudp1e54 _1yyjegat",
|
|
54
|
+
imageArea: "_2rko12b0 _1reo15vq _18m915vq _bfhkhfxm _4t3i68cl _6rthu2gc _p12f1osq _1bsbp3fh",
|
|
55
|
+
image: "_1e0c1ule _4t3i1osq _5ral1f51 _1bsb1osq",
|
|
56
|
+
imageHidden: "_3um015vq",
|
|
57
|
+
attribution: "_11c8wadc _zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1i4qfg65",
|
|
58
|
+
attributionIcon: "_16jlidpf _1o9zidpf _i0dlexct _4cvr1h6o _1e0c1txw _4t3i7vkz _1bah1h6o _1bsb7vkz"
|
|
34
59
|
};
|
|
35
60
|
|
|
36
|
-
/**
|
|
61
|
+
/** The selected item's description and attribution are announced through its aria-describedby. */
|
|
37
62
|
var QuickInsertHoverPreview = exports.QuickInsertHoverPreview = function QuickInsertHoverPreview(_ref) {
|
|
38
|
-
var
|
|
39
|
-
|
|
63
|
+
var description = _ref.description,
|
|
64
|
+
id = _ref.id,
|
|
65
|
+
preview = _ref.preview,
|
|
66
|
+
referenceElement = _ref.referenceElement,
|
|
67
|
+
title = _ref.title;
|
|
40
68
|
var _useThemeObserver = (0, _useThemeObserver2.useThemeObserver)(),
|
|
41
69
|
colorMode = _useThemeObserver.colorMode;
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
previewImageUrl: previewImageUrl,
|
|
46
|
-
referenceElement: referenceElement
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
var QuickInsertHoverPreviewImage = function QuickInsertHoverPreviewImage(_ref2) {
|
|
50
|
-
var previewImageUrl = _ref2.previewImageUrl,
|
|
51
|
-
referenceElement = _ref2.referenceElement;
|
|
52
|
-
var _useState = (0, _react.useState)(false),
|
|
53
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
54
|
-
hasFailed = _useState2[0],
|
|
55
|
-
setHasFailed = _useState2[1];
|
|
56
|
-
var _useState3 = (0, _react.useState)(),
|
|
57
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
58
|
-
dimensions = _useState4[0],
|
|
59
|
-
setDimensions = _useState4[1];
|
|
60
|
-
if (hasFailed) {
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Unlike a dialog popup, this decorative preview must not introduce focus or ARIA ownership.
|
|
65
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/React.createElement(_main.Popper, {
|
|
66
|
-
offset: PREVIEW_OFFSET,
|
|
70
|
+
var imageUrl = preview.image ? colorMode === 'dark' && preview.image.dark ? preview.image.dark : preview.image.light : undefined;
|
|
71
|
+
var hasAccessibleContent = Boolean(description || preview.attribution);
|
|
72
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/React.createElement(_reactPopper.Popper, {
|
|
67
73
|
placement: "right-start",
|
|
68
74
|
referenceElement: referenceElement,
|
|
69
75
|
strategy: "fixed",
|
|
70
|
-
shouldFitViewport: true,
|
|
71
76
|
modifiers: PREVIEW_MODIFIERS
|
|
72
|
-
}, function (
|
|
73
|
-
var ref =
|
|
74
|
-
style =
|
|
75
|
-
|
|
77
|
+
}, function (_ref2) {
|
|
78
|
+
var ref = _ref2.ref,
|
|
79
|
+
style = _ref2.style,
|
|
80
|
+
update = _ref2.update;
|
|
81
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
76
82
|
ref: ref,
|
|
77
|
-
style:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
naturalWidth = _event$currentTarget.naturalWidth;
|
|
89
|
-
if (naturalWidth === 0) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
setDimensions({
|
|
93
|
-
height: naturalHeight / naturalWidth * PREVIEW_WIDTH,
|
|
94
|
-
width: PREVIEW_WIDTH
|
|
95
|
-
});
|
|
96
|
-
},
|
|
97
|
-
onError: function onError() {
|
|
98
|
-
return setHasFailed(true);
|
|
99
|
-
},
|
|
100
|
-
className: (0, _runtime.ax)([styles.image, dimensions ? styles.visible : styles.hidden])
|
|
101
|
-
});
|
|
83
|
+
style: style,
|
|
84
|
+
className: (0, _runtime.ax)([styles.positioner])
|
|
85
|
+
}, /*#__PURE__*/React.createElement(QuickInsertPreviewPanel, {
|
|
86
|
+
description: description,
|
|
87
|
+
id: hasAccessibleContent ? id : undefined,
|
|
88
|
+
imageUrl: imageUrl,
|
|
89
|
+
preview: preview,
|
|
90
|
+
referenceElement: referenceElement,
|
|
91
|
+
title: title,
|
|
92
|
+
update: update
|
|
93
|
+
}));
|
|
102
94
|
}), referenceElement.ownerDocument.body);
|
|
95
|
+
};
|
|
96
|
+
var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
|
|
97
|
+
var _preview$attribution;
|
|
98
|
+
var description = _ref3.description,
|
|
99
|
+
id = _ref3.id,
|
|
100
|
+
imageUrl = _ref3.imageUrl,
|
|
101
|
+
preview = _ref3.preview,
|
|
102
|
+
referenceElement = _ref3.referenceElement,
|
|
103
|
+
title = _ref3.title,
|
|
104
|
+
update = _ref3.update;
|
|
105
|
+
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
106
|
+
formatMessage = _useIntl.formatMessage;
|
|
107
|
+
var _useState = (0, _react.useState)(null),
|
|
108
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
109
|
+
panelElement = _useState2[0],
|
|
110
|
+
setPanelElement = _useState2[1];
|
|
111
|
+
var AttributionIcon = (_preview$attribution = preview.attribution) === null || _preview$attribution === void 0 ? void 0 : _preview$attribution.icon;
|
|
112
|
+
(0, _react.useLayoutEffect)(function () {
|
|
113
|
+
var _referenceElement$own;
|
|
114
|
+
void update();
|
|
115
|
+
var ResizeObserverConstructor = (_referenceElement$own = referenceElement.ownerDocument.defaultView) === null || _referenceElement$own === void 0 ? void 0 : _referenceElement$own.ResizeObserver;
|
|
116
|
+
if (!panelElement || !ResizeObserverConstructor) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
var observer = new ResizeObserverConstructor(function () {
|
|
120
|
+
return void update();
|
|
121
|
+
});
|
|
122
|
+
observer.observe(panelElement);
|
|
123
|
+
return function () {
|
|
124
|
+
return observer.disconnect();
|
|
125
|
+
};
|
|
126
|
+
}, [panelElement, referenceElement, update]);
|
|
127
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
ref: setPanelElement,
|
|
129
|
+
id: id,
|
|
130
|
+
role: id ? 'tooltip' : undefined,
|
|
131
|
+
"data-testid": "quick-insert-preview-panel",
|
|
132
|
+
className: (0, _runtime.ax)([styles.panel])
|
|
133
|
+
}, imageUrl && /*#__PURE__*/React.createElement(PreviewImage, {
|
|
134
|
+
key: imageUrl,
|
|
135
|
+
imageUrl: imageUrl
|
|
136
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: (0, _runtime.ax)([styles.content])
|
|
138
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
"aria-hidden": "true",
|
|
140
|
+
className: (0, _runtime.ax)([styles.title])
|
|
141
|
+
}, title), description && /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
className: (0, _runtime.ax)([styles.description])
|
|
143
|
+
}, description), preview.attribution && /*#__PURE__*/React.createElement("div", {
|
|
144
|
+
className: (0, _runtime.ax)([styles.attribution])
|
|
145
|
+
}, AttributionIcon && /*#__PURE__*/React.createElement("span", {
|
|
146
|
+
"aria-hidden": "true",
|
|
147
|
+
className: (0, _runtime.ax)([styles.attributionIcon])
|
|
148
|
+
}, /*#__PURE__*/React.createElement(AttributionIcon, null)), /*#__PURE__*/React.createElement(_text.Text, {
|
|
149
|
+
size: "small",
|
|
150
|
+
color: "color.text.subtle"
|
|
151
|
+
}, AttributionIcon ? preview.attribution.name : formatMessage(_messages.messages.previewAttributionBy, {
|
|
152
|
+
name: preview.attribution.name
|
|
153
|
+
})))));
|
|
154
|
+
};
|
|
155
|
+
var PreviewImage = function PreviewImage(_ref4) {
|
|
156
|
+
var imageUrl = _ref4.imageUrl;
|
|
157
|
+
var _useState3 = (0, _react.useState)(false),
|
|
158
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
159
|
+
hasFailed = _useState4[0],
|
|
160
|
+
setHasFailed = _useState4[1];
|
|
161
|
+
var _useState5 = (0, _react.useState)(false),
|
|
162
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
163
|
+
hasLoaded = _useState6[0],
|
|
164
|
+
setHasLoaded = _useState6[1];
|
|
165
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
"aria-hidden": "true",
|
|
167
|
+
"data-testid": "quick-insert-preview-image-area",
|
|
168
|
+
className: (0, _runtime.ax)([styles.imageArea])
|
|
169
|
+
}, !hasFailed && /*#__PURE__*/React.createElement("img", {
|
|
170
|
+
"aria-hidden": "true",
|
|
171
|
+
"data-testid": "quick-insert-hover-preview",
|
|
172
|
+
src: imageUrl,
|
|
173
|
+
alt: "",
|
|
174
|
+
onLoad: function onLoad() {
|
|
175
|
+
return setHasLoaded(true);
|
|
176
|
+
},
|
|
177
|
+
onError: function onError() {
|
|
178
|
+
return setHasFailed(true);
|
|
179
|
+
},
|
|
180
|
+
className: (0, _runtime.ax)([styles.image, !hasLoaded && styles.imageHidden])
|
|
181
|
+
}));
|
|
103
182
|
};
|
|
@@ -15,8 +15,10 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
|
|
|
15
15
|
iconBefore = _ref.iconBefore,
|
|
16
16
|
isDisabled = _ref.isDisabled,
|
|
17
17
|
onSelect = _ref.onSelect,
|
|
18
|
+
preview = _ref.preview,
|
|
18
19
|
previewImageUrls = _ref.previewImageUrls,
|
|
19
20
|
shortcut = _ref.shortcut,
|
|
21
|
+
shouldShowPreview = _ref.shouldShowPreview,
|
|
20
22
|
shouldWrapIcon = _ref.shouldWrapIcon,
|
|
21
23
|
title = _ref.title;
|
|
22
24
|
var _useQuickInsertContex = (0, _useQuickInsertContext.useQuickInsertContext)(),
|
|
@@ -36,8 +38,10 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
|
|
|
36
38
|
iconBefore: iconBefore,
|
|
37
39
|
isDisabled: isDisabled,
|
|
38
40
|
onSelect: onSelect,
|
|
41
|
+
preview: preview,
|
|
39
42
|
previewImageUrls: previewImageUrls,
|
|
40
43
|
shortcut: shortcut,
|
|
44
|
+
shouldShowPreview: shouldShowPreview,
|
|
41
45
|
shouldWrapIcon: shouldWrapIcon,
|
|
42
46
|
title: title
|
|
43
47
|
});
|
|
@@ -6,11 +6,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.QuickInsertMenuSection = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _headingItem = _interopRequireDefault(require("@atlaskit/menu/heading-item"));
|
|
10
|
+
var _box = require("@atlaskit/primitives/compiled/box");
|
|
10
11
|
var QuickInsertMenuSection = exports.QuickInsertMenuSection = function QuickInsertMenuSection(_ref) {
|
|
11
12
|
var children = _ref.children,
|
|
12
13
|
title = _ref.title;
|
|
13
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
15
|
+
role: "group",
|
|
16
|
+
"aria-label": title
|
|
17
|
+
}, /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
18
|
+
paddingBlockStart: "space.150",
|
|
19
|
+
paddingBlockEnd: "space.050"
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement(_headingItem.default, {
|
|
21
|
+
"aria-hidden": true
|
|
22
|
+
}, title)), children);
|
|
16
23
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ConfluenceAttributionIcon = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _rawIcons = require("@atlaskit/logo/raw-icons");
|
|
10
|
+
/** Decorative product icon accompanying the localized Confluence attribution name. */
|
|
11
|
+
var ConfluenceAttributionIcon = exports.ConfluenceAttributionIcon = function ConfluenceAttributionIcon() {
|
|
12
|
+
return /*#__PURE__*/_react.default.createElement("img", {
|
|
13
|
+
src: _rawIcons.confluenceIcon,
|
|
14
|
+
alt: "",
|
|
15
|
+
width: 16,
|
|
16
|
+
height: 16
|
|
17
|
+
});
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.JiraAttributionIcon = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _rawIcons = require("@atlaskit/logo/raw-icons");
|
|
10
|
+
/** Decorative product icon accompanying the localized Jira attribution name. */
|
|
11
|
+
var JiraAttributionIcon = exports.JiraAttributionIcon = function JiraAttributionIcon() {
|
|
12
|
+
return /*#__PURE__*/_react.default.createElement("img", {
|
|
13
|
+
src: _rawIcons.jiraIcon,
|
|
14
|
+
alt: "",
|
|
15
|
+
width: 16,
|
|
16
|
+
height: 16
|
|
17
|
+
});
|
|
18
|
+
};
|