@atlaskit/editor-toolbar 0.16.0 → 0.16.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/dist/cjs/ui/ToolbarKeyboardNavigationProvider.js +75 -5
- package/dist/cjs/ui/icons/AIChatIcon.js +2 -4
- package/dist/es2019/ui/ToolbarKeyboardNavigationProvider.js +73 -5
- package/dist/es2019/ui/icons/AIChatIcon.js +2 -16
- package/dist/esm/ui/ToolbarKeyboardNavigationProvider.js +75 -5
- package/dist/esm/ui/icons/AIChatIcon.js +2 -4
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.16.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bcd51cc2f9737`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bcd51cc2f9737) -
|
|
8
|
+
EDITOR-2489: Clean up platform_editor_ai_rovo_rebrand
|
|
9
|
+
|
|
10
|
+
## 0.16.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`238f9a879ab1d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/238f9a879ab1d) -
|
|
15
|
+
Add left and right arrow keyboard shortcuts to selection toolbar
|
|
16
|
+
|
|
3
17
|
## 0.16.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.ToolbarKeyboardNavigationProvider = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _browserApis = require("@atlaskit/browser-apis");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
11
|
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); }
|
|
10
12
|
var ToolbarKeyboardNavigationProvider = exports.ToolbarKeyboardNavigationProvider = function ToolbarKeyboardNavigationProvider(_ref) {
|
|
11
13
|
var children = _ref.children,
|
|
@@ -22,16 +24,84 @@ var ToolbarKeyboardNavigationProvider = exports.ToolbarKeyboardNavigationProvide
|
|
|
22
24
|
return;
|
|
23
25
|
}
|
|
24
26
|
var element = wrapperRef.current;
|
|
27
|
+
var getFocusableElements = function getFocusableElements() {
|
|
28
|
+
if (!element) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
// Find all focusable elements within the toolbar that match the child component selector
|
|
32
|
+
var focusableSelectors = ['button:not([disabled])', '[role="button"]:not([disabled])', '[tabindex]:not([tabindex="-1"])'].join(',');
|
|
33
|
+
var allFocusable = Array.from(element.querySelectorAll(focusableSelectors));
|
|
34
|
+
|
|
35
|
+
// Filter to only include elements that are:
|
|
36
|
+
// 1. Within the child component selector
|
|
37
|
+
// 2. Visible (not hidden by display:none on itself or any parent)
|
|
38
|
+
return allFocusable.filter(function (el) {
|
|
39
|
+
if (!el.closest("".concat(childComponentSelector))) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Check if the element or any of its parents have display: none
|
|
44
|
+
var currentEl = el;
|
|
45
|
+
while (currentEl && currentEl !== element) {
|
|
46
|
+
var computedStyle = window.getComputedStyle(currentEl);
|
|
47
|
+
if (computedStyle.display === 'none' || computedStyle.visibility === 'hidden') {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
currentEl = currentEl.parentElement;
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
var moveFocus = function moveFocus(direction) {
|
|
56
|
+
var _focusableElements$ne;
|
|
57
|
+
var focusableElements = getFocusableElements();
|
|
58
|
+
if (focusableElements.length === 0) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
var doc = (0, _browserApis.getDocument)();
|
|
62
|
+
var currentIndex = focusableElements.findIndex(function (el) {
|
|
63
|
+
return el === (doc === null || doc === void 0 ? void 0 : doc.activeElement);
|
|
64
|
+
});
|
|
65
|
+
var nextIndex;
|
|
66
|
+
if (currentIndex === -1) {
|
|
67
|
+
// No element currently focused, focus the first one
|
|
68
|
+
nextIndex = 0;
|
|
69
|
+
} else if (direction === 'right') {
|
|
70
|
+
// Move right, wrap to beginning if at end
|
|
71
|
+
nextIndex = (currentIndex + 1) % focusableElements.length;
|
|
72
|
+
} else {
|
|
73
|
+
// Move left, wrap to end if at beginning
|
|
74
|
+
nextIndex = currentIndex === 0 ? focusableElements.length - 1 : currentIndex - 1;
|
|
75
|
+
}
|
|
76
|
+
(_focusableElements$ne = focusableElements[nextIndex]) === null || _focusableElements$ne === void 0 || _focusableElements$ne.focus();
|
|
77
|
+
};
|
|
25
78
|
var handleKeyDown = function handleKeyDown(event) {
|
|
26
79
|
var targetElement = event.target;
|
|
27
80
|
if (targetElement instanceof HTMLElement && !targetElement.closest("".concat(childComponentSelector))) {
|
|
28
81
|
return;
|
|
29
82
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
83
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_patch_7')) {
|
|
84
|
+
switch (event.key) {
|
|
85
|
+
case 'Escape':
|
|
86
|
+
handleEscape(event);
|
|
87
|
+
break;
|
|
88
|
+
case 'ArrowLeft':
|
|
89
|
+
event.preventDefault();
|
|
90
|
+
moveFocus('left');
|
|
91
|
+
break;
|
|
92
|
+
case 'ArrowRight':
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
moveFocus('right');
|
|
95
|
+
break;
|
|
96
|
+
default:
|
|
97
|
+
}
|
|
98
|
+
} else {
|
|
99
|
+
switch (event.key) {
|
|
100
|
+
case 'Escape':
|
|
101
|
+
handleEscape(event);
|
|
102
|
+
break;
|
|
103
|
+
default:
|
|
104
|
+
}
|
|
35
105
|
}
|
|
36
106
|
};
|
|
37
107
|
var globalKeyDownHandler = function globalKeyDownHandler(event) {
|
|
@@ -9,13 +9,11 @@ exports.AIChatIcon = void 0;
|
|
|
9
9
|
require("./AIChatIcon.compiled.css");
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
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); }
|
|
14
13
|
var styles = {
|
|
15
14
|
container: "_1e0c1txw _4cvr1h6o _1bah1h6o _4t3i1crf _1bsb1crf"
|
|
16
15
|
};
|
|
17
|
-
var
|
|
18
|
-
var ROVO_SVG_PATH = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<path d=\"M5.4905 0.135176C5.80591 -0.0450587 6.19311 -0.0450584 6.50852 0.135176L10.8688 2.62676C11.1885 2.80943 11.3857 3.14937 11.3857 3.51754V8.48246C11.3857 8.85063 11.1885 9.19057 10.8688 9.37324L6.50852 11.8648C6.19311 12.0451 5.80591 12.0451 5.4905 11.8648L1.13022 9.37324C0.810557 9.19057 0.613281 8.85063 0.613281 8.48246V3.51754C0.613281 3.14937 0.810557 2.80943 1.13022 2.62676L5.4905 0.135176Z\" fill=\"#BF63F3\"/>\n\t\t<mask id=\"mask0_7293_80230\" style=\"mask-type:alpha\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"12\" height=\"12\">\n\t\t\t<path d=\"M5.49147 0.135176C5.80688 -0.0450587 6.19409 -0.0450584 6.5095 0.135176L10.8698 2.62676C11.1894 2.80943 11.3867 3.14937 11.3867 3.51754V8.48246C11.3867 8.85063 11.1894 9.19057 10.8698 9.37324L6.5095 11.8648C6.19409 12.0451 5.80688 12.0451 5.49147 11.8648L1.13119 9.37324C0.811533 9.19057 0.614258 8.85063 0.614258 8.48246V3.51754C0.614258 3.14937 0.811533 2.80943 1.13119 2.62676L5.49147 0.135176Z\" fill=\"#BF63F3\"/>\n\t\t</mask>\n\t\t<g mask=\"url(#mask0_7293_80230)\">\n\t\t\t<path d=\"M1.16288 17.7949C1.88804 16.4071 2.9469 15.3192 4.34131 14.5785C5.73572 13.8378 7.35499 13.5206 8.99441 13.7092L0.174767 -2.55519C-1.28774 -2.29055 -2.70974 -1.80225 -4.07832 -1.07526C-5.44691 -0.348264 -6.62375 0.522036 -7.64571 1.5465L1.16656 17.7973L1.16288 17.7949Z\" fill=\"#82B536\"/>\n\t\t\t<path d=\"M6.2482 7.95377C3.81481 8.96062 1.95638 10.6236 1.88069 12.9253C1.88069 12.9253 1.88199 12.9371 1.88076 12.9428C1.87578 13.1139 1.87896 13.2868 1.89469 13.4633C1.89533 13.4648 1.89596 13.4663 1.89659 13.4678C1.91139 13.6465 1.93718 13.8294 1.97333 14.0151C1.98259 14.0588 1.99625 14.1041 2.00551 14.1478C2.03868 14.296 2.07186 14.4442 2.11979 14.5968C2.18327 14.7994 2.25711 15.0047 2.3457 15.2144C2.50959 15.6024 2.70185 15.9488 2.90932 16.2571C3.18552 16.6673 3.48842 17.0101 3.79015 17.2936C3.86597 17.3643 3.94053 17.432 4.01695 17.4954C4.37212 17.7357 4.89091 18.0543 5.7602 18.4584C6.328 18.7233 7.04924 19.025 7.97282 19.3662C8.7114 18.2422 10.0629 17.368 11.3277 16.3888C12.3263 15.6149 13.2681 14.7764 13.805 13.6971C14.2974 12.7085 14.3102 11.4765 13.7704 10.1986C12.4194 7.00012 9.42898 6.63591 6.2507 7.95097L6.2482 7.95377Z\" fill=\"#FCA700\"/>\n\t\t\t<path d=\"M11.6634 -7.61136L-2.81461 -5.02797C-2.81461 -5.02797 -1.3238 1.52224 -4.55981 7.48526C-4.11672 7.5189 -3.66847 7.5392 -3.21522 7.53288C5.12023 7.41664 11.7808 0.635945 11.6634 -7.61401L11.6634 -7.61136Z\" fill=\"#1868DB\"/>\n\t\t</g>\n\t\t<path d=\"M5.67239 2.71364C5.90711 2.58408 6.19359 2.58646 6.42641 2.72078L8.69144 4.02848C8.92849 4.16524 9.07522 4.41898 9.07522 4.69232V7.30776C9.07522 7.58218 8.92938 7.83479 8.69162 7.97148L6.98899 8.95449C6.99272 8.94401 6.99627 8.93347 6.99965 8.92286C7.03126 8.82487 7.04801 8.72132 7.04801 8.61548V6.00004C7.04801 5.64073 6.8569 5.3094 6.54519 5.13016L5.27598 4.39771V3.3846C5.27598 3.30477 5.28833 3.22678 5.31168 3.15296C5.3691 2.97429 5.49122 2.81962 5.65828 2.72306L5.65879 2.72277C5.66358 2.72001 5.66814 2.71694 5.67239 2.71364Z\" fill=\"white\"/>\n\t\t<path d=\"M5.09599 3.04811L3.39336 4.03112C3.1556 4.1678 3.00977 4.42042 3.00977 4.69484V7.31028C3.00977 7.58362 3.15646 7.83734 3.39352 7.9741L5.65857 9.28182C5.89139 9.41612 6.17789 9.41851 6.4126 9.28896C6.41685 9.28566 6.42137 9.28261 6.42616 9.27985C6.59341 9.18336 6.71572 9.02863 6.77323 8.84989C6.79663 8.77599 6.809 8.69792 6.809 8.618V7.60489L5.53987 6.87249C5.22822 6.69323 5.03697 6.36183 5.03697 6.00256V3.38712C5.03697 3.28142 5.05368 3.17802 5.0852 3.08015C5.08862 3.0694 5.09222 3.05872 5.09599 3.04811Z\" fill=\"white\"/>\n\t</svg>";
|
|
16
|
+
var ROVO_SVG_PATH = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<path d=\"M5.38007 0.169224C5.79665 -0.0605531 6.30508 -0.0563317 6.71827 0.181888L9.96761 2.05659L10.7381 2.50115C11.1589 2.7437 11.4193 3.1937 11.4193 3.67848V8.31707C11.4193 8.80377 11.1604 9.25178 10.7385 9.4942L7.71671 11.2376C7.72332 11.219 7.72963 11.2003 7.73565 11.1815C7.79172 11.0077 7.82146 10.8241 7.82146 10.6363V5.99777C7.82146 5.36053 7.4823 4.7729 6.92908 4.45501L6.37094 4.13313L4.67654 3.15598V1.35919C4.67654 1.21761 4.69845 1.0793 4.7399 0.948371C4.8418 0.631497 5.05854 0.357177 5.35505 0.185934L5.35594 0.185415C5.36443 0.180511 5.37252 0.175072 5.38007 0.169224Z\" fill=\"#FCA700\"/>\n\t\t<path d=\"M4.35709 0.762451L1.33533 2.50585C0.91337 2.74828 0.654541 3.19629 0.654541 3.68299V8.32158C0.654541 8.80636 0.914895 9.25633 1.33561 9.49887L2.05206 9.91223L5.35553 11.8182C5.76872 12.0563 6.27717 12.0606 6.69373 11.8308C6.70128 11.825 6.7093 11.8196 6.71781 11.8147C7.01463 11.6435 7.2317 11.3691 7.33376 11.0521C7.3753 10.9211 7.39725 10.7826 7.39725 10.6409V8.84408L5.64872 7.83569L5.14485 7.54513C4.59174 7.22722 4.25234 6.63946 4.25234 6.00228V1.3637C4.25234 1.17625 4.28199 0.992849 4.33793 0.81927C4.344 0.800208 4.35039 0.781265 4.35709 0.762451Z\" fill=\"#FCA700\"/>\n\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.64872 7.83569L2.05206 9.91223L1.33561 9.49887C0.914895 9.25633 0.654541 8.80636 0.654541 8.32158V3.68299C0.654541 3.19629 0.91337 2.74828 1.33533 2.50585L4.35709 0.762451C4.35039 0.781265 4.344 0.800208 4.33793 0.81927C4.28199 0.992849 4.25234 1.17625 4.25234 1.3637V6.00228C4.25234 6.63946 4.59174 7.22722 5.14485 7.54513L5.64872 7.83569Z\" fill=\"#1868DB\"/>\n\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.37094 4.13313L4.67654 3.15598V1.35919C4.67654 1.21761 4.69845 1.0793 4.7399 0.948371C4.8418 0.631497 5.05854 0.357177 5.35505 0.185934L5.35594 0.185415C5.36443 0.180511 5.37252 0.175072 5.38007 0.169224C5.79665 -0.0605531 6.30508 -0.0563317 6.71827 0.181888L9.96761 2.05659L6.37094 4.13313Z\" fill=\"#FCA700\"/>\n\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.7381 2.5012L9.9676 2.05664L6.37094 4.13318L6.92907 4.45507C7.48229 4.77296 7.82146 5.36059 7.82146 5.99783V10.6364C7.82146 10.8241 7.79172 11.0078 7.73565 11.1816C7.72963 11.2004 7.72332 11.2191 7.71671 11.2377L10.7385 9.49426C11.1604 9.25184 11.4193 8.80382 11.4193 8.31712V3.67853C11.4193 3.19376 11.1589 2.74376 10.7381 2.5012Z\" fill=\"#AF59E0\"/>\n\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.64873 7.83569L2.05206 9.91224L5.35553 11.8182C5.76873 12.0564 6.27718 12.0606 6.69373 11.8308C6.70128 11.825 6.70931 11.8196 6.71782 11.8147C7.01463 11.6436 7.2317 11.3691 7.33377 11.0521C7.37531 10.9211 7.39726 10.7826 7.39726 10.6409V8.84409L5.64873 7.83569Z\" fill=\"#6A9A23\"/>\n\t</svg>";
|
|
19
17
|
var RovoLogoSVG = function RovoLogoSVG(_ref) {
|
|
20
18
|
var label = _ref.label,
|
|
21
19
|
testId = _ref.testId;
|
|
@@ -26,7 +24,7 @@ var RovoLogoSVG = function RovoLogoSVG(_ref) {
|
|
|
26
24
|
// eslint-disable-next-line react/no-danger
|
|
27
25
|
,
|
|
28
26
|
dangerouslySetInnerHTML: {
|
|
29
|
-
__html:
|
|
27
|
+
__html: ROVO_SVG_PATH
|
|
30
28
|
},
|
|
31
29
|
className: (0, _runtime.ax)([styles.container])
|
|
32
30
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React, { useLayoutEffect, useRef } from 'react';
|
|
2
|
+
import { getDocument } from '@atlaskit/browser-apis';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
4
|
export const ToolbarKeyboardNavigationProvider = ({
|
|
3
5
|
children,
|
|
4
6
|
childComponentSelector,
|
|
@@ -17,16 +19,82 @@ export const ToolbarKeyboardNavigationProvider = ({
|
|
|
17
19
|
const {
|
|
18
20
|
current: element
|
|
19
21
|
} = wrapperRef;
|
|
22
|
+
const getFocusableElements = () => {
|
|
23
|
+
if (!element) {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
// Find all focusable elements within the toolbar that match the child component selector
|
|
27
|
+
const focusableSelectors = ['button:not([disabled])', '[role="button"]:not([disabled])', '[tabindex]:not([tabindex="-1"])'].join(',');
|
|
28
|
+
const allFocusable = Array.from(element.querySelectorAll(focusableSelectors));
|
|
29
|
+
|
|
30
|
+
// Filter to only include elements that are:
|
|
31
|
+
// 1. Within the child component selector
|
|
32
|
+
// 2. Visible (not hidden by display:none on itself or any parent)
|
|
33
|
+
return allFocusable.filter(el => {
|
|
34
|
+
if (!el.closest(`${childComponentSelector}`)) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Check if the element or any of its parents have display: none
|
|
39
|
+
let currentEl = el;
|
|
40
|
+
while (currentEl && currentEl !== element) {
|
|
41
|
+
const computedStyle = window.getComputedStyle(currentEl);
|
|
42
|
+
if (computedStyle.display === 'none' || computedStyle.visibility === 'hidden') {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
currentEl = currentEl.parentElement;
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
const moveFocus = direction => {
|
|
51
|
+
var _focusableElements$ne;
|
|
52
|
+
const focusableElements = getFocusableElements();
|
|
53
|
+
if (focusableElements.length === 0) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const doc = getDocument();
|
|
57
|
+
const currentIndex = focusableElements.findIndex(el => el === (doc === null || doc === void 0 ? void 0 : doc.activeElement));
|
|
58
|
+
let nextIndex;
|
|
59
|
+
if (currentIndex === -1) {
|
|
60
|
+
// No element currently focused, focus the first one
|
|
61
|
+
nextIndex = 0;
|
|
62
|
+
} else if (direction === 'right') {
|
|
63
|
+
// Move right, wrap to beginning if at end
|
|
64
|
+
nextIndex = (currentIndex + 1) % focusableElements.length;
|
|
65
|
+
} else {
|
|
66
|
+
// Move left, wrap to end if at beginning
|
|
67
|
+
nextIndex = currentIndex === 0 ? focusableElements.length - 1 : currentIndex - 1;
|
|
68
|
+
}
|
|
69
|
+
(_focusableElements$ne = focusableElements[nextIndex]) === null || _focusableElements$ne === void 0 ? void 0 : _focusableElements$ne.focus();
|
|
70
|
+
};
|
|
20
71
|
const handleKeyDown = event => {
|
|
21
72
|
const targetElement = event.target;
|
|
22
73
|
if (targetElement instanceof HTMLElement && !targetElement.closest(`${childComponentSelector}`)) {
|
|
23
74
|
return;
|
|
24
75
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
76
|
+
if (fg('platform_editor_toolbar_aifc_patch_7')) {
|
|
77
|
+
switch (event.key) {
|
|
78
|
+
case 'Escape':
|
|
79
|
+
handleEscape(event);
|
|
80
|
+
break;
|
|
81
|
+
case 'ArrowLeft':
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
moveFocus('left');
|
|
84
|
+
break;
|
|
85
|
+
case 'ArrowRight':
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
moveFocus('right');
|
|
88
|
+
break;
|
|
89
|
+
default:
|
|
90
|
+
}
|
|
91
|
+
} else {
|
|
92
|
+
switch (event.key) {
|
|
93
|
+
case 'Escape':
|
|
94
|
+
handleEscape(event);
|
|
95
|
+
break;
|
|
96
|
+
default:
|
|
97
|
+
}
|
|
30
98
|
}
|
|
31
99
|
};
|
|
32
100
|
const globalKeyDownHandler = event => {
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
import "./AIChatIcon.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
const styles = {
|
|
7
6
|
container: "_1e0c1txw _4cvr1h6o _1bah1h6o _4t3i1crf _1bsb1crf"
|
|
8
7
|
};
|
|
9
|
-
const
|
|
8
|
+
const ROVO_SVG_PATH = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
9
|
<path d="M5.38007 0.169224C5.79665 -0.0605531 6.30508 -0.0563317 6.71827 0.181888L9.96761 2.05659L10.7381 2.50115C11.1589 2.7437 11.4193 3.1937 11.4193 3.67848V8.31707C11.4193 8.80377 11.1604 9.25178 10.7385 9.4942L7.71671 11.2376C7.72332 11.219 7.72963 11.2003 7.73565 11.1815C7.79172 11.0077 7.82146 10.8241 7.82146 10.6363V5.99777C7.82146 5.36053 7.4823 4.7729 6.92908 4.45501L6.37094 4.13313L4.67654 3.15598V1.35919C4.67654 1.21761 4.69845 1.0793 4.7399 0.948371C4.8418 0.631497 5.05854 0.357177 5.35505 0.185934L5.35594 0.185415C5.36443 0.180511 5.37252 0.175072 5.38007 0.169224Z" fill="#FCA700"/>
|
|
11
10
|
<path d="M4.35709 0.762451L1.33533 2.50585C0.91337 2.74828 0.654541 3.19629 0.654541 3.68299V8.32158C0.654541 8.80636 0.914895 9.25633 1.33561 9.49887L2.05206 9.91223L5.35553 11.8182C5.76872 12.0563 6.27717 12.0606 6.69373 11.8308C6.70128 11.825 6.7093 11.8196 6.71781 11.8147C7.01463 11.6435 7.2317 11.3691 7.33376 11.0521C7.3753 10.9211 7.39725 10.7826 7.39725 10.6409V8.84408L5.64872 7.83569L5.14485 7.54513C4.59174 7.22722 4.25234 6.63946 4.25234 6.00228V1.3637C4.25234 1.17625 4.28199 0.992849 4.33793 0.81927C4.344 0.800208 4.35039 0.781265 4.35709 0.762451Z" fill="#FCA700"/>
|
|
12
11
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.64872 7.83569L2.05206 9.91223L1.33561 9.49887C0.914895 9.25633 0.654541 8.80636 0.654541 8.32158V3.68299C0.654541 3.19629 0.91337 2.74828 1.33533 2.50585L4.35709 0.762451C4.35039 0.781265 4.344 0.800208 4.33793 0.81927C4.28199 0.992849 4.25234 1.17625 4.25234 1.3637V6.00228C4.25234 6.63946 4.59174 7.22722 5.14485 7.54513L5.64872 7.83569Z" fill="#1868DB"/>
|
|
@@ -14,19 +13,6 @@ const NEW_ROVO_SVG_PATH = `<svg width="12" height="12" viewBox="0 0 12 12" fill=
|
|
|
14
13
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7381 2.5012L9.9676 2.05664L6.37094 4.13318L6.92907 4.45507C7.48229 4.77296 7.82146 5.36059 7.82146 5.99783V10.6364C7.82146 10.8241 7.79172 11.0078 7.73565 11.1816C7.72963 11.2004 7.72332 11.2191 7.71671 11.2377L10.7385 9.49426C11.1604 9.25184 11.4193 8.80382 11.4193 8.31712V3.67853C11.4193 3.19376 11.1589 2.74376 10.7381 2.5012Z" fill="#AF59E0"/>
|
|
15
14
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.64873 7.83569L2.05206 9.91224L5.35553 11.8182C5.76873 12.0564 6.27718 12.0606 6.69373 11.8308C6.70128 11.825 6.70931 11.8196 6.71782 11.8147C7.01463 11.6436 7.2317 11.3691 7.33377 11.0521C7.37531 10.9211 7.39726 10.7826 7.39726 10.6409V8.84409L5.64873 7.83569Z" fill="#6A9A23"/>
|
|
16
15
|
</svg>`;
|
|
17
|
-
const ROVO_SVG_PATH = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
18
|
-
<path d="M5.4905 0.135176C5.80591 -0.0450587 6.19311 -0.0450584 6.50852 0.135176L10.8688 2.62676C11.1885 2.80943 11.3857 3.14937 11.3857 3.51754V8.48246C11.3857 8.85063 11.1885 9.19057 10.8688 9.37324L6.50852 11.8648C6.19311 12.0451 5.80591 12.0451 5.4905 11.8648L1.13022 9.37324C0.810557 9.19057 0.613281 8.85063 0.613281 8.48246V3.51754C0.613281 3.14937 0.810557 2.80943 1.13022 2.62676L5.4905 0.135176Z" fill="#BF63F3"/>
|
|
19
|
-
<mask id="mask0_7293_80230" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="12" height="12">
|
|
20
|
-
<path d="M5.49147 0.135176C5.80688 -0.0450587 6.19409 -0.0450584 6.5095 0.135176L10.8698 2.62676C11.1894 2.80943 11.3867 3.14937 11.3867 3.51754V8.48246C11.3867 8.85063 11.1894 9.19057 10.8698 9.37324L6.5095 11.8648C6.19409 12.0451 5.80688 12.0451 5.49147 11.8648L1.13119 9.37324C0.811533 9.19057 0.614258 8.85063 0.614258 8.48246V3.51754C0.614258 3.14937 0.811533 2.80943 1.13119 2.62676L5.49147 0.135176Z" fill="#BF63F3"/>
|
|
21
|
-
</mask>
|
|
22
|
-
<g mask="url(#mask0_7293_80230)">
|
|
23
|
-
<path d="M1.16288 17.7949C1.88804 16.4071 2.9469 15.3192 4.34131 14.5785C5.73572 13.8378 7.35499 13.5206 8.99441 13.7092L0.174767 -2.55519C-1.28774 -2.29055 -2.70974 -1.80225 -4.07832 -1.07526C-5.44691 -0.348264 -6.62375 0.522036 -7.64571 1.5465L1.16656 17.7973L1.16288 17.7949Z" fill="#82B536"/>
|
|
24
|
-
<path d="M6.2482 7.95377C3.81481 8.96062 1.95638 10.6236 1.88069 12.9253C1.88069 12.9253 1.88199 12.9371 1.88076 12.9428C1.87578 13.1139 1.87896 13.2868 1.89469 13.4633C1.89533 13.4648 1.89596 13.4663 1.89659 13.4678C1.91139 13.6465 1.93718 13.8294 1.97333 14.0151C1.98259 14.0588 1.99625 14.1041 2.00551 14.1478C2.03868 14.296 2.07186 14.4442 2.11979 14.5968C2.18327 14.7994 2.25711 15.0047 2.3457 15.2144C2.50959 15.6024 2.70185 15.9488 2.90932 16.2571C3.18552 16.6673 3.48842 17.0101 3.79015 17.2936C3.86597 17.3643 3.94053 17.432 4.01695 17.4954C4.37212 17.7357 4.89091 18.0543 5.7602 18.4584C6.328 18.7233 7.04924 19.025 7.97282 19.3662C8.7114 18.2422 10.0629 17.368 11.3277 16.3888C12.3263 15.6149 13.2681 14.7764 13.805 13.6971C14.2974 12.7085 14.3102 11.4765 13.7704 10.1986C12.4194 7.00012 9.42898 6.63591 6.2507 7.95097L6.2482 7.95377Z" fill="#FCA700"/>
|
|
25
|
-
<path d="M11.6634 -7.61136L-2.81461 -5.02797C-2.81461 -5.02797 -1.3238 1.52224 -4.55981 7.48526C-4.11672 7.5189 -3.66847 7.5392 -3.21522 7.53288C5.12023 7.41664 11.7808 0.635945 11.6634 -7.61401L11.6634 -7.61136Z" fill="#1868DB"/>
|
|
26
|
-
</g>
|
|
27
|
-
<path d="M5.67239 2.71364C5.90711 2.58408 6.19359 2.58646 6.42641 2.72078L8.69144 4.02848C8.92849 4.16524 9.07522 4.41898 9.07522 4.69232V7.30776C9.07522 7.58218 8.92938 7.83479 8.69162 7.97148L6.98899 8.95449C6.99272 8.94401 6.99627 8.93347 6.99965 8.92286C7.03126 8.82487 7.04801 8.72132 7.04801 8.61548V6.00004C7.04801 5.64073 6.8569 5.3094 6.54519 5.13016L5.27598 4.39771V3.3846C5.27598 3.30477 5.28833 3.22678 5.31168 3.15296C5.3691 2.97429 5.49122 2.81962 5.65828 2.72306L5.65879 2.72277C5.66358 2.72001 5.66814 2.71694 5.67239 2.71364Z" fill="white"/>
|
|
28
|
-
<path d="M5.09599 3.04811L3.39336 4.03112C3.1556 4.1678 3.00977 4.42042 3.00977 4.69484V7.31028C3.00977 7.58362 3.15646 7.83734 3.39352 7.9741L5.65857 9.28182C5.89139 9.41612 6.17789 9.41851 6.4126 9.28896C6.41685 9.28566 6.42137 9.28261 6.42616 9.27985C6.59341 9.18336 6.71572 9.02863 6.77323 8.84989C6.79663 8.77599 6.809 8.69792 6.809 8.618V7.60489L5.53987 6.87249C5.22822 6.69323 5.03697 6.36183 5.03697 6.00256V3.38712C5.03697 3.28142 5.05368 3.17802 5.0852 3.08015C5.08862 3.0694 5.09222 3.05872 5.09599 3.04811Z" fill="white"/>
|
|
29
|
-
</svg>`;
|
|
30
16
|
const RovoLogoSVG = ({
|
|
31
17
|
label,
|
|
32
18
|
testId
|
|
@@ -37,7 +23,7 @@ const RovoLogoSVG = ({
|
|
|
37
23
|
// eslint-disable-next-line react/no-danger
|
|
38
24
|
,
|
|
39
25
|
dangerouslySetInnerHTML: {
|
|
40
|
-
__html:
|
|
26
|
+
__html: ROVO_SVG_PATH
|
|
41
27
|
},
|
|
42
28
|
className: ax([styles.container])
|
|
43
29
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React, { useLayoutEffect, useRef } from 'react';
|
|
2
|
+
import { getDocument } from '@atlaskit/browser-apis';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
4
|
export var ToolbarKeyboardNavigationProvider = function ToolbarKeyboardNavigationProvider(_ref) {
|
|
3
5
|
var children = _ref.children,
|
|
4
6
|
childComponentSelector = _ref.childComponentSelector,
|
|
@@ -14,16 +16,84 @@ export var ToolbarKeyboardNavigationProvider = function ToolbarKeyboardNavigatio
|
|
|
14
16
|
return;
|
|
15
17
|
}
|
|
16
18
|
var element = wrapperRef.current;
|
|
19
|
+
var getFocusableElements = function getFocusableElements() {
|
|
20
|
+
if (!element) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
// Find all focusable elements within the toolbar that match the child component selector
|
|
24
|
+
var focusableSelectors = ['button:not([disabled])', '[role="button"]:not([disabled])', '[tabindex]:not([tabindex="-1"])'].join(',');
|
|
25
|
+
var allFocusable = Array.from(element.querySelectorAll(focusableSelectors));
|
|
26
|
+
|
|
27
|
+
// Filter to only include elements that are:
|
|
28
|
+
// 1. Within the child component selector
|
|
29
|
+
// 2. Visible (not hidden by display:none on itself or any parent)
|
|
30
|
+
return allFocusable.filter(function (el) {
|
|
31
|
+
if (!el.closest("".concat(childComponentSelector))) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Check if the element or any of its parents have display: none
|
|
36
|
+
var currentEl = el;
|
|
37
|
+
while (currentEl && currentEl !== element) {
|
|
38
|
+
var computedStyle = window.getComputedStyle(currentEl);
|
|
39
|
+
if (computedStyle.display === 'none' || computedStyle.visibility === 'hidden') {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
currentEl = currentEl.parentElement;
|
|
43
|
+
}
|
|
44
|
+
return true;
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var moveFocus = function moveFocus(direction) {
|
|
48
|
+
var _focusableElements$ne;
|
|
49
|
+
var focusableElements = getFocusableElements();
|
|
50
|
+
if (focusableElements.length === 0) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
var doc = getDocument();
|
|
54
|
+
var currentIndex = focusableElements.findIndex(function (el) {
|
|
55
|
+
return el === (doc === null || doc === void 0 ? void 0 : doc.activeElement);
|
|
56
|
+
});
|
|
57
|
+
var nextIndex;
|
|
58
|
+
if (currentIndex === -1) {
|
|
59
|
+
// No element currently focused, focus the first one
|
|
60
|
+
nextIndex = 0;
|
|
61
|
+
} else if (direction === 'right') {
|
|
62
|
+
// Move right, wrap to beginning if at end
|
|
63
|
+
nextIndex = (currentIndex + 1) % focusableElements.length;
|
|
64
|
+
} else {
|
|
65
|
+
// Move left, wrap to end if at beginning
|
|
66
|
+
nextIndex = currentIndex === 0 ? focusableElements.length - 1 : currentIndex - 1;
|
|
67
|
+
}
|
|
68
|
+
(_focusableElements$ne = focusableElements[nextIndex]) === null || _focusableElements$ne === void 0 || _focusableElements$ne.focus();
|
|
69
|
+
};
|
|
17
70
|
var handleKeyDown = function handleKeyDown(event) {
|
|
18
71
|
var targetElement = event.target;
|
|
19
72
|
if (targetElement instanceof HTMLElement && !targetElement.closest("".concat(childComponentSelector))) {
|
|
20
73
|
return;
|
|
21
74
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
75
|
+
if (fg('platform_editor_toolbar_aifc_patch_7')) {
|
|
76
|
+
switch (event.key) {
|
|
77
|
+
case 'Escape':
|
|
78
|
+
handleEscape(event);
|
|
79
|
+
break;
|
|
80
|
+
case 'ArrowLeft':
|
|
81
|
+
event.preventDefault();
|
|
82
|
+
moveFocus('left');
|
|
83
|
+
break;
|
|
84
|
+
case 'ArrowRight':
|
|
85
|
+
event.preventDefault();
|
|
86
|
+
moveFocus('right');
|
|
87
|
+
break;
|
|
88
|
+
default:
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
switch (event.key) {
|
|
92
|
+
case 'Escape':
|
|
93
|
+
handleEscape(event);
|
|
94
|
+
break;
|
|
95
|
+
default:
|
|
96
|
+
}
|
|
27
97
|
}
|
|
28
98
|
};
|
|
29
99
|
var globalKeyDownHandler = function globalKeyDownHandler(event) {
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
import "./AIChatIcon.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
var styles = {
|
|
7
6
|
container: "_1e0c1txw _4cvr1h6o _1bah1h6o _4t3i1crf _1bsb1crf"
|
|
8
7
|
};
|
|
9
|
-
var
|
|
10
|
-
var ROVO_SVG_PATH = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<path d=\"M5.4905 0.135176C5.80591 -0.0450587 6.19311 -0.0450584 6.50852 0.135176L10.8688 2.62676C11.1885 2.80943 11.3857 3.14937 11.3857 3.51754V8.48246C11.3857 8.85063 11.1885 9.19057 10.8688 9.37324L6.50852 11.8648C6.19311 12.0451 5.80591 12.0451 5.4905 11.8648L1.13022 9.37324C0.810557 9.19057 0.613281 8.85063 0.613281 8.48246V3.51754C0.613281 3.14937 0.810557 2.80943 1.13022 2.62676L5.4905 0.135176Z\" fill=\"#BF63F3\"/>\n\t\t<mask id=\"mask0_7293_80230\" style=\"mask-type:alpha\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"12\" height=\"12\">\n\t\t\t<path d=\"M5.49147 0.135176C5.80688 -0.0450587 6.19409 -0.0450584 6.5095 0.135176L10.8698 2.62676C11.1894 2.80943 11.3867 3.14937 11.3867 3.51754V8.48246C11.3867 8.85063 11.1894 9.19057 10.8698 9.37324L6.5095 11.8648C6.19409 12.0451 5.80688 12.0451 5.49147 11.8648L1.13119 9.37324C0.811533 9.19057 0.614258 8.85063 0.614258 8.48246V3.51754C0.614258 3.14937 0.811533 2.80943 1.13119 2.62676L5.49147 0.135176Z\" fill=\"#BF63F3\"/>\n\t\t</mask>\n\t\t<g mask=\"url(#mask0_7293_80230)\">\n\t\t\t<path d=\"M1.16288 17.7949C1.88804 16.4071 2.9469 15.3192 4.34131 14.5785C5.73572 13.8378 7.35499 13.5206 8.99441 13.7092L0.174767 -2.55519C-1.28774 -2.29055 -2.70974 -1.80225 -4.07832 -1.07526C-5.44691 -0.348264 -6.62375 0.522036 -7.64571 1.5465L1.16656 17.7973L1.16288 17.7949Z\" fill=\"#82B536\"/>\n\t\t\t<path d=\"M6.2482 7.95377C3.81481 8.96062 1.95638 10.6236 1.88069 12.9253C1.88069 12.9253 1.88199 12.9371 1.88076 12.9428C1.87578 13.1139 1.87896 13.2868 1.89469 13.4633C1.89533 13.4648 1.89596 13.4663 1.89659 13.4678C1.91139 13.6465 1.93718 13.8294 1.97333 14.0151C1.98259 14.0588 1.99625 14.1041 2.00551 14.1478C2.03868 14.296 2.07186 14.4442 2.11979 14.5968C2.18327 14.7994 2.25711 15.0047 2.3457 15.2144C2.50959 15.6024 2.70185 15.9488 2.90932 16.2571C3.18552 16.6673 3.48842 17.0101 3.79015 17.2936C3.86597 17.3643 3.94053 17.432 4.01695 17.4954C4.37212 17.7357 4.89091 18.0543 5.7602 18.4584C6.328 18.7233 7.04924 19.025 7.97282 19.3662C8.7114 18.2422 10.0629 17.368 11.3277 16.3888C12.3263 15.6149 13.2681 14.7764 13.805 13.6971C14.2974 12.7085 14.3102 11.4765 13.7704 10.1986C12.4194 7.00012 9.42898 6.63591 6.2507 7.95097L6.2482 7.95377Z\" fill=\"#FCA700\"/>\n\t\t\t<path d=\"M11.6634 -7.61136L-2.81461 -5.02797C-2.81461 -5.02797 -1.3238 1.52224 -4.55981 7.48526C-4.11672 7.5189 -3.66847 7.5392 -3.21522 7.53288C5.12023 7.41664 11.7808 0.635945 11.6634 -7.61401L11.6634 -7.61136Z\" fill=\"#1868DB\"/>\n\t\t</g>\n\t\t<path d=\"M5.67239 2.71364C5.90711 2.58408 6.19359 2.58646 6.42641 2.72078L8.69144 4.02848C8.92849 4.16524 9.07522 4.41898 9.07522 4.69232V7.30776C9.07522 7.58218 8.92938 7.83479 8.69162 7.97148L6.98899 8.95449C6.99272 8.94401 6.99627 8.93347 6.99965 8.92286C7.03126 8.82487 7.04801 8.72132 7.04801 8.61548V6.00004C7.04801 5.64073 6.8569 5.3094 6.54519 5.13016L5.27598 4.39771V3.3846C5.27598 3.30477 5.28833 3.22678 5.31168 3.15296C5.3691 2.97429 5.49122 2.81962 5.65828 2.72306L5.65879 2.72277C5.66358 2.72001 5.66814 2.71694 5.67239 2.71364Z\" fill=\"white\"/>\n\t\t<path d=\"M5.09599 3.04811L3.39336 4.03112C3.1556 4.1678 3.00977 4.42042 3.00977 4.69484V7.31028C3.00977 7.58362 3.15646 7.83734 3.39352 7.9741L5.65857 9.28182C5.89139 9.41612 6.17789 9.41851 6.4126 9.28896C6.41685 9.28566 6.42137 9.28261 6.42616 9.27985C6.59341 9.18336 6.71572 9.02863 6.77323 8.84989C6.79663 8.77599 6.809 8.69792 6.809 8.618V7.60489L5.53987 6.87249C5.22822 6.69323 5.03697 6.36183 5.03697 6.00256V3.38712C5.03697 3.28142 5.05368 3.17802 5.0852 3.08015C5.08862 3.0694 5.09222 3.05872 5.09599 3.04811Z\" fill=\"white\"/>\n\t</svg>";
|
|
8
|
+
var ROVO_SVG_PATH = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<path d=\"M5.38007 0.169224C5.79665 -0.0605531 6.30508 -0.0563317 6.71827 0.181888L9.96761 2.05659L10.7381 2.50115C11.1589 2.7437 11.4193 3.1937 11.4193 3.67848V8.31707C11.4193 8.80377 11.1604 9.25178 10.7385 9.4942L7.71671 11.2376C7.72332 11.219 7.72963 11.2003 7.73565 11.1815C7.79172 11.0077 7.82146 10.8241 7.82146 10.6363V5.99777C7.82146 5.36053 7.4823 4.7729 6.92908 4.45501L6.37094 4.13313L4.67654 3.15598V1.35919C4.67654 1.21761 4.69845 1.0793 4.7399 0.948371C4.8418 0.631497 5.05854 0.357177 5.35505 0.185934L5.35594 0.185415C5.36443 0.180511 5.37252 0.175072 5.38007 0.169224Z\" fill=\"#FCA700\"/>\n\t\t<path d=\"M4.35709 0.762451L1.33533 2.50585C0.91337 2.74828 0.654541 3.19629 0.654541 3.68299V8.32158C0.654541 8.80636 0.914895 9.25633 1.33561 9.49887L2.05206 9.91223L5.35553 11.8182C5.76872 12.0563 6.27717 12.0606 6.69373 11.8308C6.70128 11.825 6.7093 11.8196 6.71781 11.8147C7.01463 11.6435 7.2317 11.3691 7.33376 11.0521C7.3753 10.9211 7.39725 10.7826 7.39725 10.6409V8.84408L5.64872 7.83569L5.14485 7.54513C4.59174 7.22722 4.25234 6.63946 4.25234 6.00228V1.3637C4.25234 1.17625 4.28199 0.992849 4.33793 0.81927C4.344 0.800208 4.35039 0.781265 4.35709 0.762451Z\" fill=\"#FCA700\"/>\n\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.64872 7.83569L2.05206 9.91223L1.33561 9.49887C0.914895 9.25633 0.654541 8.80636 0.654541 8.32158V3.68299C0.654541 3.19629 0.91337 2.74828 1.33533 2.50585L4.35709 0.762451C4.35039 0.781265 4.344 0.800208 4.33793 0.81927C4.28199 0.992849 4.25234 1.17625 4.25234 1.3637V6.00228C4.25234 6.63946 4.59174 7.22722 5.14485 7.54513L5.64872 7.83569Z\" fill=\"#1868DB\"/>\n\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.37094 4.13313L4.67654 3.15598V1.35919C4.67654 1.21761 4.69845 1.0793 4.7399 0.948371C4.8418 0.631497 5.05854 0.357177 5.35505 0.185934L5.35594 0.185415C5.36443 0.180511 5.37252 0.175072 5.38007 0.169224C5.79665 -0.0605531 6.30508 -0.0563317 6.71827 0.181888L9.96761 2.05659L6.37094 4.13313Z\" fill=\"#FCA700\"/>\n\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M10.7381 2.5012L9.9676 2.05664L6.37094 4.13318L6.92907 4.45507C7.48229 4.77296 7.82146 5.36059 7.82146 5.99783V10.6364C7.82146 10.8241 7.79172 11.0078 7.73565 11.1816C7.72963 11.2004 7.72332 11.2191 7.71671 11.2377L10.7385 9.49426C11.1604 9.25184 11.4193 8.80382 11.4193 8.31712V3.67853C11.4193 3.19376 11.1589 2.74376 10.7381 2.5012Z\" fill=\"#AF59E0\"/>\n\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.64873 7.83569L2.05206 9.91224L5.35553 11.8182C5.76873 12.0564 6.27718 12.0606 6.69373 11.8308C6.70128 11.825 6.70931 11.8196 6.71782 11.8147C7.01463 11.6436 7.2317 11.3691 7.33377 11.0521C7.37531 10.9211 7.39726 10.7826 7.39726 10.6409V8.84409L5.64873 7.83569Z\" fill=\"#6A9A23\"/>\n\t</svg>";
|
|
11
9
|
var RovoLogoSVG = function RovoLogoSVG(_ref) {
|
|
12
10
|
var label = _ref.label,
|
|
13
11
|
testId = _ref.testId;
|
|
@@ -18,7 +16,7 @@ var RovoLogoSVG = function RovoLogoSVG(_ref) {
|
|
|
18
16
|
// eslint-disable-next-line react/no-danger
|
|
19
17
|
,
|
|
20
18
|
dangerouslySetInnerHTML: {
|
|
21
|
-
__html:
|
|
19
|
+
__html: ROVO_SVG_PATH
|
|
22
20
|
},
|
|
23
21
|
className: ax([styles.container])
|
|
24
22
|
});
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.16.
|
|
6
|
+
"version": "0.16.2",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"team": "Editor: Jenga",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@atlaskit/badge": "^18.2.0",
|
|
25
|
+
"@atlaskit/browser-apis": "^0.0.1",
|
|
25
26
|
"@atlaskit/button": "^23.5.0",
|
|
26
27
|
"@atlaskit/css": "^0.15.0",
|
|
27
28
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
33
34
|
"@atlaskit/popup": "^4.4.0",
|
|
34
35
|
"@atlaskit/primitives": "^16.0.0",
|
|
35
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
36
|
+
"@atlaskit/tmp-editor-statsig": "^13.19.0",
|
|
36
37
|
"@atlaskit/tokens": "^7.0.0",
|
|
37
38
|
"@atlaskit/tooltip": "^20.6.0",
|
|
38
39
|
"@babel/runtime": "^7.0.0",
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
}
|
|
87
88
|
},
|
|
88
89
|
"platform-feature-flags": {
|
|
89
|
-
"
|
|
90
|
+
"platform_editor_toolbar_aifc_patch_7": {
|
|
90
91
|
"type": "boolean"
|
|
91
92
|
}
|
|
92
93
|
}
|