@equinor/echo-components 0.7.3 → 0.7.7
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/components/copyToClipboard/CopyToClipboard.d.ts +1 -1
- package/dist/components/floatingSearchBar/FloatingSearchBar.d.ts +1 -1
- package/dist/hooks/useKeyboardNavigation.d.ts +5 -8
- package/dist/icons/echoAssets/index.d.ts +2 -0
- package/dist/icons/echoAssets/maps.d.ts +6 -0
- package/dist/icons/echoAssets/misc.d.ts +2 -0
- package/dist/index.js +22877 -22842
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -40,5 +40,5 @@ interface SuggestionGroupProps {
|
|
|
40
40
|
focusedOption: number;
|
|
41
41
|
}
|
|
42
42
|
declare function SuggestionGroup({ suggestionGroup, onClick, focusedOption }: SuggestionGroupProps): JSX.Element;
|
|
43
|
-
export { FloatingSearchBar };
|
|
43
|
+
export { FloatingSearchBar, SuggestionGroup };
|
|
44
44
|
export type { Suggestion };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SuggestionGroup } from '../components';
|
|
1
2
|
export type KeyboardEvents = {
|
|
2
3
|
up?: Function;
|
|
3
4
|
right?: Function;
|
|
@@ -6,16 +7,12 @@ export type KeyboardEvents = {
|
|
|
6
7
|
enter?: Function;
|
|
7
8
|
escape?: Function;
|
|
8
9
|
};
|
|
9
|
-
declare const
|
|
10
|
+
declare const useKeyboardNavigation: (keyboardEvents: KeyboardEvents, listenerTarget?: HTMLElement | Document) => void;
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
-
* 2. user presses a key (usually down) - scroll list to focused element, which should be first item
|
|
13
|
-
* in the first section. Also set focused section.
|
|
14
|
-
* 3. Potentially jump to last in list if user goes up?
|
|
12
|
+
* Handles keyboard navigation and key events in the floating search bar suggestions.
|
|
15
13
|
*/
|
|
16
|
-
declare const
|
|
14
|
+
declare const useSearchBarSectionNavigator: (sections: SuggestionGroup[], initialSelected: number, keyboardEvents: KeyboardEvents, listenerTarget?: HTMLElement | Document) => {
|
|
17
15
|
focusedSection: number;
|
|
18
16
|
focusedOption: number;
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
export { useListNavigator, useSectionNavigator, useKeyboardNavigation };
|
|
18
|
+
export { useSearchBarSectionNavigator, useKeyboardNavigation };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IconData } from '@equinor/eds-icons';
|
|
2
|
+
export declare const polygon: IconData;
|
|
3
|
+
export declare const polyrectangle: IconData;
|
|
4
|
+
export declare const polyline: IconData;
|
|
5
|
+
export declare const polygon_symbol: IconData;
|
|
6
|
+
export declare const distance_circle: IconData;
|