@uipath/apollo-react 3.58.0 → 3.58.1
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/dist/canvas/components/Toolbox/ListView.cjs +1 -1
- package/dist/canvas/components/Toolbox/ListView.d.ts +2 -2
- package/dist/canvas/components/Toolbox/ListView.d.ts.map +1 -1
- package/dist/canvas/components/Toolbox/ListView.js +1 -1
- package/dist/canvas/components/Toolbox/SearchBox.cjs +10 -1
- package/dist/canvas/components/Toolbox/SearchBox.d.ts +2 -0
- package/dist/canvas/components/Toolbox/SearchBox.d.ts.map +1 -1
- package/dist/canvas/components/Toolbox/SearchBox.js +10 -1
- package/dist/canvas/components/Toolbox/Toolbox.cjs +55 -33
- package/dist/canvas/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/canvas/components/Toolbox/Toolbox.js +55 -33
- package/dist/core/tokens/css/theme-variables.css +4 -4
- package/dist/core/tokens/scss/theme-variables.scss +4 -4
- package/package.json +3 -3
|
@@ -79,7 +79,7 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
79
79
|
]);
|
|
80
80
|
const handleButtonClick = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
81
81
|
const clickTarget = renderedItems[index];
|
|
82
|
-
if (clickTarget?.type === 'item') onItemClick(clickTarget.item);
|
|
82
|
+
if (clickTarget?.type === 'item') onItemClick(clickTarget.item, index);
|
|
83
83
|
}, [
|
|
84
84
|
onItemClick,
|
|
85
85
|
renderedItems,
|
|
@@ -28,7 +28,7 @@ export interface ListViewRowProps<T extends ListItem> {
|
|
|
28
28
|
activeIndex: number;
|
|
29
29
|
isLoading?: boolean;
|
|
30
30
|
isDarkMode?: boolean;
|
|
31
|
-
onItemClick: (item: T) => void;
|
|
31
|
+
onItemClick: (item: T, index: number) => void;
|
|
32
32
|
onItemHover?: (item: T) => void;
|
|
33
33
|
}
|
|
34
34
|
export interface ListViewHandle<T extends ListItem = ListItem> {
|
|
@@ -38,7 +38,7 @@ interface ListViewProps<T extends ListItem> {
|
|
|
38
38
|
items: T[];
|
|
39
39
|
activeIndex?: number;
|
|
40
40
|
listRef?: React.RefObject<ListImperativeAPI | null>;
|
|
41
|
-
onItemClick: (item: T) => void;
|
|
41
|
+
onItemClick: (item: T, index: number) => void;
|
|
42
42
|
onItemHover?: (item: T) => void;
|
|
43
43
|
emptyStateMessage?: string;
|
|
44
44
|
emptyStateIcon?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/ListView.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,cAAc,CAAC;AAIzE,MAAM,WAAW,YAAY;IAI3B,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,GAAG,CAAC,EAAE,MAAM,CAAC;IAIb,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACjC;AAED,MAAM,MAAM,QAAQ,CAAC,CAAC,GAAG,GAAG,IAAI;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACnF,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,QAAQ,IACrC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC;AAE9B,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,QAAQ,EACnD,KAAK,EAAE,CAAC,EAAE,EACV,cAAc,EAAE,OAAO,GACtB,UAAU,CAAC,CAAC,CAAC,EAAE,CAqCjB;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,QAAQ;IAClD,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/ListView.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,cAAc,CAAC;AAIzE,MAAM,WAAW,YAAY;IAI3B,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,GAAG,CAAC,EAAE,MAAM,CAAC;IAIb,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACjC;AAED,MAAM,MAAM,QAAQ,CAAC,CAAC,GAAG,GAAG,IAAI;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACnF,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,QAAQ,IACrC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC;AAE9B,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,QAAQ,EACnD,KAAK,EAAE,CAAC,EAAE,EACV,cAAc,EAAE,OAAO,GACtB,UAAU,CAAC,CAAC,CAAC,EAAE,CAqCjB;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,QAAQ;IAClD,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;CACjC;AAgHD,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IAC3D,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAChC;AAED,UAAU,aAAa,CAAC,CAAC,SAAS,QAAQ;IACxC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACpD,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAsED,eAAO,MAAM,QAAQ,EAA0B,CAAC,CAAC,SAAS,QAAQ,EAChE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,KAC7D,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC"}
|
|
@@ -50,7 +50,7 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
|
|
|
50
50
|
]);
|
|
51
51
|
const handleButtonClick = useCallback(()=>{
|
|
52
52
|
const clickTarget = renderedItems[index];
|
|
53
|
-
if (clickTarget?.type === 'item') onItemClick(clickTarget.item);
|
|
53
|
+
if (clickTarget?.type === 'item') onItemClick(clickTarget.item, index);
|
|
54
54
|
}, [
|
|
55
55
|
onItemClick,
|
|
56
56
|
renderedItems,
|
|
@@ -31,7 +31,7 @@ const index_cjs_namespaceObject = require("../../utils/index.cjs");
|
|
|
31
31
|
const components_index_cjs_namespaceObject = require("../../../material/components/index.cjs");
|
|
32
32
|
const external_react_namespaceObject = require("react");
|
|
33
33
|
const external_SearchBox_styles_cjs_namespaceObject = require("./SearchBox.styles.cjs");
|
|
34
|
-
const SearchBox_SearchBox = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(function({ value, onChange, clear, placeholder = 'Search...', inputRef: externalInputRef, onNavigationKeyDown, activeDescendantId }) {
|
|
34
|
+
const SearchBox_SearchBox = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(function({ value, onChange, clear, placeholder = 'Search...', inputRef: externalInputRef, clearButtonRef, onNavigationKeyDown, navigateToFirstItem, activeDescendantId }) {
|
|
35
35
|
const internalRef = (0, external_react_namespaceObject.useRef)(null);
|
|
36
36
|
const inputRef = externalInputRef ?? internalRef;
|
|
37
37
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
@@ -39,6 +39,13 @@ const SearchBox_SearchBox = /*#__PURE__*/ (0, external_react_namespaceObject.mem
|
|
|
39
39
|
}, [
|
|
40
40
|
inputRef
|
|
41
41
|
]);
|
|
42
|
+
const handleClearButtonKeyDown = (e)=>{
|
|
43
|
+
if ('Tab' === e.key) {
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
inputRef.current?.focus();
|
|
46
|
+
if (!e.shiftKey) navigateToFirstItem?.();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
42
49
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_SearchBox_styles_cjs_namespaceObject.StyledSearchForm, {
|
|
43
50
|
autoComplete: "off",
|
|
44
51
|
className: "searchbox-form",
|
|
@@ -70,9 +77,11 @@ const SearchBox_SearchBox = /*#__PURE__*/ (0, external_react_namespaceObject.mem
|
|
|
70
77
|
"aria-activedescendant": activeDescendantId
|
|
71
78
|
}),
|
|
72
79
|
value && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
80
|
+
ref: clearButtonRef,
|
|
73
81
|
type: "button",
|
|
74
82
|
className: "searchbox-clear",
|
|
75
83
|
onClick: clear,
|
|
84
|
+
onKeyDown: handleClearButtonKeyDown,
|
|
76
85
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(components_index_cjs_namespaceObject.ApIcon, {
|
|
77
86
|
name: "close",
|
|
78
87
|
size: "16px"
|
|
@@ -4,7 +4,9 @@ interface SearchBoxProps {
|
|
|
4
4
|
clear: () => void;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
inputRef?: React.RefObject<HTMLInputElement | null>;
|
|
7
|
+
clearButtonRef?: React.RefObject<HTMLButtonElement | null>;
|
|
7
8
|
onNavigationKeyDown?: (e: React.KeyboardEvent) => void;
|
|
9
|
+
navigateToFirstItem?: () => void;
|
|
8
10
|
activeDescendantId?: string;
|
|
9
11
|
}
|
|
10
12
|
export declare const SearchBox: import("react").NamedExoticComponent<SearchBoxProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/SearchBox.tsx"],"names":[],"mappings":"AAKA,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACpD,mBAAmB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IACvD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/SearchBox.tsx"],"names":[],"mappings":"AAKA,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC3D,mBAAmB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IACvD,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,SAAS,sDAmEpB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { cx } from "../../utils/index.js";
|
|
|
3
3
|
import { ApIcon } from "../../../material/components/index.js";
|
|
4
4
|
import { memo, useEffect, useRef } from "react";
|
|
5
5
|
import { StyledSearchForm } from "./SearchBox.styles.js";
|
|
6
|
-
const SearchBox_SearchBox = /*#__PURE__*/ memo(function({ value, onChange, clear, placeholder = 'Search...', inputRef: externalInputRef, onNavigationKeyDown, activeDescendantId }) {
|
|
6
|
+
const SearchBox_SearchBox = /*#__PURE__*/ memo(function({ value, onChange, clear, placeholder = 'Search...', inputRef: externalInputRef, clearButtonRef, onNavigationKeyDown, navigateToFirstItem, activeDescendantId }) {
|
|
7
7
|
const internalRef = useRef(null);
|
|
8
8
|
const inputRef = externalInputRef ?? internalRef;
|
|
9
9
|
useEffect(()=>{
|
|
@@ -11,6 +11,13 @@ const SearchBox_SearchBox = /*#__PURE__*/ memo(function({ value, onChange, clear
|
|
|
11
11
|
}, [
|
|
12
12
|
inputRef
|
|
13
13
|
]);
|
|
14
|
+
const handleClearButtonKeyDown = (e)=>{
|
|
15
|
+
if ('Tab' === e.key) {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
inputRef.current?.focus();
|
|
18
|
+
if (!e.shiftKey) navigateToFirstItem?.();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
14
21
|
return /*#__PURE__*/ jsx(StyledSearchForm, {
|
|
15
22
|
autoComplete: "off",
|
|
16
23
|
className: "searchbox-form",
|
|
@@ -42,9 +49,11 @@ const SearchBox_SearchBox = /*#__PURE__*/ memo(function({ value, onChange, clear
|
|
|
42
49
|
"aria-activedescendant": activeDescendantId
|
|
43
50
|
}),
|
|
44
51
|
value && /*#__PURE__*/ jsx("button", {
|
|
52
|
+
ref: clearButtonRef,
|
|
45
53
|
type: "button",
|
|
46
54
|
className: "searchbox-clear",
|
|
47
55
|
onClick: clear,
|
|
56
|
+
onKeyDown: handleClearButtonKeyDown,
|
|
48
57
|
children: /*#__PURE__*/ jsx(ApIcon, {
|
|
49
58
|
name: "close",
|
|
50
59
|
size: "16px"
|
|
@@ -98,6 +98,7 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
98
98
|
const listRef = (0, external_react_window_namespaceObject.useListRef)(null);
|
|
99
99
|
const listViewRef = (0, external_react_namespaceObject.useRef)(null);
|
|
100
100
|
const searchInputRef = (0, external_react_namespaceObject.useRef)(null);
|
|
101
|
+
const clearButtonRef = (0, external_react_namespaceObject.useRef)(null);
|
|
101
102
|
const isSearching = (0, external_react_namespaceObject.useMemo)(()=>search.length > 0, [
|
|
102
103
|
search
|
|
103
104
|
]);
|
|
@@ -117,21 +118,32 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
117
118
|
}, []);
|
|
118
119
|
const navigateToIndex = (0, external_react_namespaceObject.useCallback)((index)=>{
|
|
119
120
|
setActiveIndex(index);
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
searchInputRef.current?.focus();
|
|
122
|
+
if (index !== SEARCH_BAR_INDEX) requestAnimationFrame(()=>{
|
|
123
|
+
listRef.current?.scrollToRow({
|
|
124
|
+
index,
|
|
125
|
+
align: 'auto'
|
|
126
|
+
});
|
|
124
127
|
});
|
|
125
128
|
}, [
|
|
126
129
|
listRef
|
|
127
130
|
]);
|
|
131
|
+
const navigateToFirstItem = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
132
|
+
const renderedItems = listViewRef.current?.renderedItems ?? [];
|
|
133
|
+
const firstIndex = getFirstSelectableIndex(renderedItems);
|
|
134
|
+
if (firstIndex !== SEARCH_BAR_INDEX) navigateToIndex(firstIndex);
|
|
135
|
+
}, [
|
|
136
|
+
navigateToIndex
|
|
137
|
+
]);
|
|
128
138
|
const clearSearch = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
129
139
|
setSearch('');
|
|
130
140
|
setSearchedItems([]);
|
|
131
141
|
setSearchLoading(false);
|
|
132
142
|
setIsSearchingInitialItems(true);
|
|
133
|
-
|
|
134
|
-
}, [
|
|
143
|
+
navigateToIndex(SEARCH_BAR_INDEX);
|
|
144
|
+
}, [
|
|
145
|
+
navigateToIndex
|
|
146
|
+
]);
|
|
135
147
|
const handleSearch = (0, external_react_namespaceObject.useCallback)(async (query)=>{
|
|
136
148
|
if (!query.trim()) {
|
|
137
149
|
setSearchLoading(false);
|
|
@@ -162,30 +174,35 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
162
174
|
]);
|
|
163
175
|
const handleBackTransition = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
164
176
|
startTransition('back');
|
|
165
|
-
setActiveIndex(SEARCH_BAR_INDEX);
|
|
166
177
|
const previousState = navigationStack.pop();
|
|
167
178
|
if (previousState) {
|
|
168
179
|
setItems(previousState.data.items);
|
|
169
180
|
setCurrentParentItem(previousState.data.parentItem);
|
|
170
181
|
}
|
|
171
|
-
|
|
182
|
+
setSearch('');
|
|
183
|
+
setSearchedItems([]);
|
|
184
|
+
setSearchLoading(false);
|
|
185
|
+
setIsSearchingInitialItems(true);
|
|
186
|
+
const restoredIndex = previousState?.data.activeIndex ?? SEARCH_BAR_INDEX;
|
|
187
|
+
navigateToIndex(restoredIndex);
|
|
172
188
|
onBack?.();
|
|
173
189
|
}, [
|
|
174
190
|
navigationStack,
|
|
175
|
-
isSearching,
|
|
176
191
|
onBack,
|
|
177
|
-
|
|
178
|
-
|
|
192
|
+
startTransition,
|
|
193
|
+
navigateToIndex
|
|
179
194
|
]);
|
|
180
|
-
const handleItemSelect = (0, external_react_namespaceObject.useCallback)(async (item)=>{
|
|
195
|
+
const handleItemSelect = (0, external_react_namespaceObject.useCallback)(async (item, index)=>{
|
|
181
196
|
if (!item.children) return void onItemSelect(item);
|
|
182
197
|
setChildrenLoading(true);
|
|
183
198
|
const nestedItems = 'function' == typeof item.children ? await item.children(item.id, item.name) : item.children;
|
|
199
|
+
const savedIndex = isSearching ? SEARCH_BAR_INDEX : index ?? activeIndex;
|
|
184
200
|
navigationStack.push({
|
|
185
201
|
title: currentParentItem?.name || title,
|
|
186
202
|
data: {
|
|
187
203
|
items,
|
|
188
|
-
parentItem: currentParentItem
|
|
204
|
+
parentItem: currentParentItem,
|
|
205
|
+
activeIndex: savedIndex
|
|
189
206
|
}
|
|
190
207
|
});
|
|
191
208
|
setItems(nestedItems);
|
|
@@ -199,6 +216,8 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
199
216
|
currentParentItem,
|
|
200
217
|
title,
|
|
201
218
|
items,
|
|
219
|
+
activeIndex,
|
|
220
|
+
isSearching,
|
|
202
221
|
clearSearch,
|
|
203
222
|
startTransition,
|
|
204
223
|
onItemSelect
|
|
@@ -221,7 +240,8 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
221
240
|
...stackItem,
|
|
222
241
|
data: {
|
|
223
242
|
items: newInitialItems,
|
|
224
|
-
parentItem: null
|
|
243
|
+
parentItem: null,
|
|
244
|
+
activeIndex: stackItem.data.activeIndex
|
|
225
245
|
}
|
|
226
246
|
};
|
|
227
247
|
const updatedParentItem = findItemById(newInitialItems, stackItem.data.parentItem.id);
|
|
@@ -231,7 +251,8 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
231
251
|
...stackItem,
|
|
232
252
|
data: {
|
|
233
253
|
items: updatedItems,
|
|
234
|
-
parentItem: updatedParentItem
|
|
254
|
+
parentItem: updatedParentItem,
|
|
255
|
+
activeIndex: stackItem.data.activeIndex
|
|
235
256
|
}
|
|
236
257
|
};
|
|
237
258
|
});
|
|
@@ -260,16 +281,11 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
260
281
|
if (isTransitioning) return;
|
|
261
282
|
const renderedItems = listViewRef.current?.renderedItems ?? [];
|
|
262
283
|
const navigateDown = ()=>{
|
|
263
|
-
if (activeIndex === SEARCH_BAR_INDEX)
|
|
264
|
-
|
|
265
|
-
if (firstIndex !== SEARCH_BAR_INDEX) navigateToIndex(firstIndex);
|
|
266
|
-
} else {
|
|
284
|
+
if (activeIndex === SEARCH_BAR_INDEX) navigateToFirstItem();
|
|
285
|
+
else {
|
|
267
286
|
const nextIndex = getNextSelectableIndex(renderedItems, activeIndex, 'down');
|
|
268
287
|
if (nextIndex !== SEARCH_BAR_INDEX) navigateToIndex(nextIndex);
|
|
269
|
-
else
|
|
270
|
-
const firstIndex = getFirstSelectableIndex(renderedItems);
|
|
271
|
-
if (firstIndex !== SEARCH_BAR_INDEX) navigateToIndex(firstIndex);
|
|
272
|
-
}
|
|
288
|
+
else navigateToFirstItem();
|
|
273
289
|
}
|
|
274
290
|
};
|
|
275
291
|
const navigateUp = ()=>{
|
|
@@ -284,9 +300,10 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
284
300
|
e.preventDefault();
|
|
285
301
|
navigateUp();
|
|
286
302
|
break;
|
|
303
|
+
case ' ':
|
|
287
304
|
case 'Enter':
|
|
288
305
|
{
|
|
289
|
-
if (activeIndex === SEARCH_BAR_INDEX)
|
|
306
|
+
if (activeIndex === SEARCH_BAR_INDEX) return;
|
|
290
307
|
const renderItem = renderedItems[activeIndex];
|
|
291
308
|
if (renderItem?.type === 'item') {
|
|
292
309
|
e.preventDefault();
|
|
@@ -309,18 +326,20 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
309
326
|
handleBackTransition();
|
|
310
327
|
break;
|
|
311
328
|
case 'Tab':
|
|
329
|
+
if (activeIndex === SEARCH_BAR_INDEX && search.length > 0 && !e.shiftKey) break;
|
|
312
330
|
e.preventDefault();
|
|
313
|
-
if (e.shiftKey)
|
|
314
|
-
|
|
331
|
+
if (activeIndex === SEARCH_BAR_INDEX && e.shiftKey) break;
|
|
332
|
+
if (e.shiftKey) {
|
|
333
|
+
navigateUp();
|
|
334
|
+
const nextUp = getNextSelectableIndex(renderedItems, activeIndex, 'up');
|
|
335
|
+
if (nextUp === SEARCH_BAR_INDEX && search.length > 0) clearButtonRef.current?.focus();
|
|
336
|
+
} else navigateDown();
|
|
315
337
|
break;
|
|
316
338
|
case 'Home':
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
if (firstIndex !== SEARCH_BAR_INDEX) navigateToIndex(firstIndex);
|
|
322
|
-
break;
|
|
323
|
-
}
|
|
339
|
+
if (activeIndex === SEARCH_BAR_INDEX) break;
|
|
340
|
+
e.preventDefault();
|
|
341
|
+
navigateToFirstItem();
|
|
342
|
+
break;
|
|
324
343
|
case 'End':
|
|
325
344
|
{
|
|
326
345
|
if (activeIndex === SEARCH_BAR_INDEX) break;
|
|
@@ -336,6 +355,7 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
336
355
|
activeIndex,
|
|
337
356
|
navigationStack.canGoBack,
|
|
338
357
|
navigateToIndex,
|
|
358
|
+
navigateToFirstItem,
|
|
339
359
|
handleItemSelect,
|
|
340
360
|
handleBackTransition
|
|
341
361
|
]);
|
|
@@ -386,7 +406,9 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
386
406
|
clear: clearSearch,
|
|
387
407
|
placeholder: "Search",
|
|
388
408
|
inputRef: searchInputRef,
|
|
409
|
+
clearButtonRef: clearButtonRef,
|
|
389
410
|
onNavigationKeyDown: handleNavigationKeyDown,
|
|
411
|
+
navigateToFirstItem: navigateToFirstItem,
|
|
390
412
|
activeDescendantId: activeDescendantId
|
|
391
413
|
}),
|
|
392
414
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Toolbox_styles_cjs_namespaceObject.AnimatedContainer, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbox.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/Toolbox.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,QAAQ,EAAkD,MAAM,YAAY,CAAC;AAwC3F,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,GAAG,IAAI,CAC1C,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,OAAO,EACzB,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE;IAAE,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,KAC5E,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAE5B,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;CACpC;AAgDD,wBAAgB,OAAO,CAAC,CAAC,EAAE,EACzB,OAAO,EACP,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,YAAY,EACZ,OAAO,GACR,EAAE,YAAY,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"Toolbox.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/Toolbox.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,QAAQ,EAAkD,MAAM,YAAY,CAAC;AAwC3F,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,GAAG,IAAI,CAC1C,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,OAAO,EACzB,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE;IAAE,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,KAC5E,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAE5B,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;CACpC;AAgDD,wBAAgB,OAAO,CAAC,CAAC,EAAE,EACzB,OAAO,EACP,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,YAAY,EACZ,OAAO,GACR,EAAE,YAAY,CAAC,CAAC,CAAC,2CAocjB"}
|
|
@@ -70,6 +70,7 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
70
70
|
const listRef = useListRef(null);
|
|
71
71
|
const listViewRef = useRef(null);
|
|
72
72
|
const searchInputRef = useRef(null);
|
|
73
|
+
const clearButtonRef = useRef(null);
|
|
73
74
|
const isSearching = useMemo(()=>search.length > 0, [
|
|
74
75
|
search
|
|
75
76
|
]);
|
|
@@ -89,21 +90,32 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
89
90
|
}, []);
|
|
90
91
|
const navigateToIndex = useCallback((index)=>{
|
|
91
92
|
setActiveIndex(index);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
searchInputRef.current?.focus();
|
|
94
|
+
if (index !== SEARCH_BAR_INDEX) requestAnimationFrame(()=>{
|
|
95
|
+
listRef.current?.scrollToRow({
|
|
96
|
+
index,
|
|
97
|
+
align: 'auto'
|
|
98
|
+
});
|
|
96
99
|
});
|
|
97
100
|
}, [
|
|
98
101
|
listRef
|
|
99
102
|
]);
|
|
103
|
+
const navigateToFirstItem = useCallback(()=>{
|
|
104
|
+
const renderedItems = listViewRef.current?.renderedItems ?? [];
|
|
105
|
+
const firstIndex = getFirstSelectableIndex(renderedItems);
|
|
106
|
+
if (firstIndex !== SEARCH_BAR_INDEX) navigateToIndex(firstIndex);
|
|
107
|
+
}, [
|
|
108
|
+
navigateToIndex
|
|
109
|
+
]);
|
|
100
110
|
const clearSearch = useCallback(()=>{
|
|
101
111
|
setSearch('');
|
|
102
112
|
setSearchedItems([]);
|
|
103
113
|
setSearchLoading(false);
|
|
104
114
|
setIsSearchingInitialItems(true);
|
|
105
|
-
|
|
106
|
-
}, [
|
|
115
|
+
navigateToIndex(SEARCH_BAR_INDEX);
|
|
116
|
+
}, [
|
|
117
|
+
navigateToIndex
|
|
118
|
+
]);
|
|
107
119
|
const handleSearch = useCallback(async (query)=>{
|
|
108
120
|
if (!query.trim()) {
|
|
109
121
|
setSearchLoading(false);
|
|
@@ -134,30 +146,35 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
134
146
|
]);
|
|
135
147
|
const handleBackTransition = useCallback(()=>{
|
|
136
148
|
startTransition('back');
|
|
137
|
-
setActiveIndex(SEARCH_BAR_INDEX);
|
|
138
149
|
const previousState = navigationStack.pop();
|
|
139
150
|
if (previousState) {
|
|
140
151
|
setItems(previousState.data.items);
|
|
141
152
|
setCurrentParentItem(previousState.data.parentItem);
|
|
142
153
|
}
|
|
143
|
-
|
|
154
|
+
setSearch('');
|
|
155
|
+
setSearchedItems([]);
|
|
156
|
+
setSearchLoading(false);
|
|
157
|
+
setIsSearchingInitialItems(true);
|
|
158
|
+
const restoredIndex = previousState?.data.activeIndex ?? SEARCH_BAR_INDEX;
|
|
159
|
+
navigateToIndex(restoredIndex);
|
|
144
160
|
onBack?.();
|
|
145
161
|
}, [
|
|
146
162
|
navigationStack,
|
|
147
|
-
isSearching,
|
|
148
163
|
onBack,
|
|
149
|
-
|
|
150
|
-
|
|
164
|
+
startTransition,
|
|
165
|
+
navigateToIndex
|
|
151
166
|
]);
|
|
152
|
-
const handleItemSelect = useCallback(async (item)=>{
|
|
167
|
+
const handleItemSelect = useCallback(async (item, index)=>{
|
|
153
168
|
if (!item.children) return void onItemSelect(item);
|
|
154
169
|
setChildrenLoading(true);
|
|
155
170
|
const nestedItems = 'function' == typeof item.children ? await item.children(item.id, item.name) : item.children;
|
|
171
|
+
const savedIndex = isSearching ? SEARCH_BAR_INDEX : index ?? activeIndex;
|
|
156
172
|
navigationStack.push({
|
|
157
173
|
title: currentParentItem?.name || title,
|
|
158
174
|
data: {
|
|
159
175
|
items,
|
|
160
|
-
parentItem: currentParentItem
|
|
176
|
+
parentItem: currentParentItem,
|
|
177
|
+
activeIndex: savedIndex
|
|
161
178
|
}
|
|
162
179
|
});
|
|
163
180
|
setItems(nestedItems);
|
|
@@ -171,6 +188,8 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
171
188
|
currentParentItem,
|
|
172
189
|
title,
|
|
173
190
|
items,
|
|
191
|
+
activeIndex,
|
|
192
|
+
isSearching,
|
|
174
193
|
clearSearch,
|
|
175
194
|
startTransition,
|
|
176
195
|
onItemSelect
|
|
@@ -193,7 +212,8 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
193
212
|
...stackItem,
|
|
194
213
|
data: {
|
|
195
214
|
items: newInitialItems,
|
|
196
|
-
parentItem: null
|
|
215
|
+
parentItem: null,
|
|
216
|
+
activeIndex: stackItem.data.activeIndex
|
|
197
217
|
}
|
|
198
218
|
};
|
|
199
219
|
const updatedParentItem = findItemById(newInitialItems, stackItem.data.parentItem.id);
|
|
@@ -203,7 +223,8 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
203
223
|
...stackItem,
|
|
204
224
|
data: {
|
|
205
225
|
items: updatedItems,
|
|
206
|
-
parentItem: updatedParentItem
|
|
226
|
+
parentItem: updatedParentItem,
|
|
227
|
+
activeIndex: stackItem.data.activeIndex
|
|
207
228
|
}
|
|
208
229
|
};
|
|
209
230
|
});
|
|
@@ -232,16 +253,11 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
232
253
|
if (isTransitioning) return;
|
|
233
254
|
const renderedItems = listViewRef.current?.renderedItems ?? [];
|
|
234
255
|
const navigateDown = ()=>{
|
|
235
|
-
if (activeIndex === SEARCH_BAR_INDEX)
|
|
236
|
-
|
|
237
|
-
if (firstIndex !== SEARCH_BAR_INDEX) navigateToIndex(firstIndex);
|
|
238
|
-
} else {
|
|
256
|
+
if (activeIndex === SEARCH_BAR_INDEX) navigateToFirstItem();
|
|
257
|
+
else {
|
|
239
258
|
const nextIndex = getNextSelectableIndex(renderedItems, activeIndex, 'down');
|
|
240
259
|
if (nextIndex !== SEARCH_BAR_INDEX) navigateToIndex(nextIndex);
|
|
241
|
-
else
|
|
242
|
-
const firstIndex = getFirstSelectableIndex(renderedItems);
|
|
243
|
-
if (firstIndex !== SEARCH_BAR_INDEX) navigateToIndex(firstIndex);
|
|
244
|
-
}
|
|
260
|
+
else navigateToFirstItem();
|
|
245
261
|
}
|
|
246
262
|
};
|
|
247
263
|
const navigateUp = ()=>{
|
|
@@ -256,9 +272,10 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
256
272
|
e.preventDefault();
|
|
257
273
|
navigateUp();
|
|
258
274
|
break;
|
|
275
|
+
case ' ':
|
|
259
276
|
case 'Enter':
|
|
260
277
|
{
|
|
261
|
-
if (activeIndex === SEARCH_BAR_INDEX)
|
|
278
|
+
if (activeIndex === SEARCH_BAR_INDEX) return;
|
|
262
279
|
const renderItem = renderedItems[activeIndex];
|
|
263
280
|
if (renderItem?.type === 'item') {
|
|
264
281
|
e.preventDefault();
|
|
@@ -281,18 +298,20 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
281
298
|
handleBackTransition();
|
|
282
299
|
break;
|
|
283
300
|
case 'Tab':
|
|
301
|
+
if (activeIndex === SEARCH_BAR_INDEX && search.length > 0 && !e.shiftKey) break;
|
|
284
302
|
e.preventDefault();
|
|
285
|
-
if (e.shiftKey)
|
|
286
|
-
|
|
303
|
+
if (activeIndex === SEARCH_BAR_INDEX && e.shiftKey) break;
|
|
304
|
+
if (e.shiftKey) {
|
|
305
|
+
navigateUp();
|
|
306
|
+
const nextUp = getNextSelectableIndex(renderedItems, activeIndex, 'up');
|
|
307
|
+
if (nextUp === SEARCH_BAR_INDEX && search.length > 0) clearButtonRef.current?.focus();
|
|
308
|
+
} else navigateDown();
|
|
287
309
|
break;
|
|
288
310
|
case 'Home':
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if (firstIndex !== SEARCH_BAR_INDEX) navigateToIndex(firstIndex);
|
|
294
|
-
break;
|
|
295
|
-
}
|
|
311
|
+
if (activeIndex === SEARCH_BAR_INDEX) break;
|
|
312
|
+
e.preventDefault();
|
|
313
|
+
navigateToFirstItem();
|
|
314
|
+
break;
|
|
296
315
|
case 'End':
|
|
297
316
|
{
|
|
298
317
|
if (activeIndex === SEARCH_BAR_INDEX) break;
|
|
@@ -308,6 +327,7 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
308
327
|
activeIndex,
|
|
309
328
|
navigationStack.canGoBack,
|
|
310
329
|
navigateToIndex,
|
|
330
|
+
navigateToFirstItem,
|
|
311
331
|
handleItemSelect,
|
|
312
332
|
handleBackTransition
|
|
313
333
|
]);
|
|
@@ -358,7 +378,9 @@ function Toolbox({ onClose, onBack, onItemSelect, onSearch, onItemHover, title,
|
|
|
358
378
|
clear: clearSearch,
|
|
359
379
|
placeholder: "Search",
|
|
360
380
|
inputRef: searchInputRef,
|
|
381
|
+
clearButtonRef: clearButtonRef,
|
|
361
382
|
onNavigationKeyDown: handleNavigationKeyDown,
|
|
383
|
+
navigateToFirstItem: navigateToFirstItem,
|
|
362
384
|
activeDescendantId: activeDescendantId
|
|
363
385
|
}),
|
|
364
386
|
/*#__PURE__*/ jsx(AnimatedContainer, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import "./variables.css";
|
|
2
2
|
|
|
3
|
-
body.light, .light {
|
|
3
|
+
body.light, .apollo-design.light {
|
|
4
4
|
--color-background: #ffffff;
|
|
5
5
|
--color-background-secondary: #f4f5f7;
|
|
6
6
|
--color-background-inverse: #182027;
|
|
@@ -125,7 +125,7 @@ body.light, .light {
|
|
|
125
125
|
color-scheme: light;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
body.light-hc, .light-hc {
|
|
128
|
+
body.light-hc, .apollo-design.light-hc {
|
|
129
129
|
--color-background: #ffffff;
|
|
130
130
|
--color-background-secondary: #f4f5f7;
|
|
131
131
|
--color-background-inverse: #182027;
|
|
@@ -250,7 +250,7 @@ body.light-hc, .light-hc {
|
|
|
250
250
|
color-scheme: light;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
body.dark, .dark {
|
|
253
|
+
body.dark, .apollo-design.dark {
|
|
254
254
|
--color-background: #182027;
|
|
255
255
|
--color-background-secondary: #273139;
|
|
256
256
|
--color-background-inverse: #f8f9fa;
|
|
@@ -375,7 +375,7 @@ body.dark, .dark {
|
|
|
375
375
|
color-scheme: dark;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
body.dark-hc, .dark-hc {
|
|
378
|
+
body.dark-hc, .apollo-design.dark-hc {
|
|
379
379
|
--color-background: #182027;
|
|
380
380
|
--color-background-secondary: #273139;
|
|
381
381
|
--color-background-inverse: #f8f9fa;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import "./variables";
|
|
2
2
|
|
|
3
|
-
body.light, .light {
|
|
3
|
+
body.light, .apollo-design.light {
|
|
4
4
|
--color-background: #{$color-background-light};
|
|
5
5
|
--color-background-secondary: #{$color-background-secondary-light};
|
|
6
6
|
--color-background-inverse: #{$color-background-inverse-light};
|
|
@@ -125,7 +125,7 @@ body.light, .light {
|
|
|
125
125
|
color-scheme: light;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
body.light-hc, .light-hc {
|
|
128
|
+
body.light-hc, .apollo-design.light-hc {
|
|
129
129
|
--color-background: #{$color-background-light-hc};
|
|
130
130
|
--color-background-secondary: #{$color-background-secondary-light-hc};
|
|
131
131
|
--color-background-inverse: #{$color-background-inverse-light-hc};
|
|
@@ -250,7 +250,7 @@ body.light-hc, .light-hc {
|
|
|
250
250
|
color-scheme: light;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
body.dark, .dark {
|
|
253
|
+
body.dark, .apollo-design.dark {
|
|
254
254
|
--color-background: #{$color-background-dark};
|
|
255
255
|
--color-background-secondary: #{$color-background-secondary-dark};
|
|
256
256
|
--color-background-inverse: #{$color-background-inverse-dark};
|
|
@@ -375,7 +375,7 @@ body.dark, .dark {
|
|
|
375
375
|
color-scheme: dark;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
body.dark-hc, .dark-hc {
|
|
378
|
+
body.dark-hc, .apollo-design.dark-hc {
|
|
379
379
|
--color-background: #{$color-background-dark-hc};
|
|
380
380
|
--color-background-secondary: #{$color-background-secondary-dark-hc};
|
|
381
381
|
--color-background-inverse: #{$color-background-inverse-dark-hc};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "3.58.
|
|
3
|
+
"version": "3.58.1",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -200,8 +200,8 @@
|
|
|
200
200
|
"use-sync-external-store": "^1.2.0",
|
|
201
201
|
"zod": "^4.3.5",
|
|
202
202
|
"zustand": "^5.0.9",
|
|
203
|
-
"@uipath/apollo-core": "5.7.
|
|
204
|
-
"@uipath/apollo-wind": "1.2.
|
|
203
|
+
"@uipath/apollo-core": "5.7.4",
|
|
204
|
+
"@uipath/apollo-wind": "1.2.1"
|
|
205
205
|
},
|
|
206
206
|
"devDependencies": {
|
|
207
207
|
"@lingui/cli": "^5.6.1",
|