@equinor/echo-components 0.7.5 → 0.7.9

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.
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  interface LinkProps {
3
- className?: string;
4
3
  /** The external link. */
5
4
  href: string;
6
5
  /** The link label. */
@@ -8,5 +7,5 @@ interface LinkProps {
8
7
  /** If true, the link is opened in the same window or tab. */
9
8
  preserveTab?: boolean;
10
9
  }
11
- declare const BlackLink: ({ className, href, linkText, preserveTab }: LinkProps) => JSX.Element;
10
+ declare const BlackLink: ({ href, linkText, preserveTab }: LinkProps) => JSX.Element;
12
11
  export { BlackLink };
@@ -1,9 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface CopyToClipboardProps {
3
3
  copyableText: string;
4
- variant?: 'neutral' | 'warning' | 'error' | 'success';
5
- multiline?: boolean;
6
- className?: string;
7
4
  }
8
5
  declare const CopyToClipboard: (props: CopyToClipboardProps) => JSX.Element;
9
6
  export { CopyToClipboard };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  interface WithLabel {
3
- variant: 'square_icon_with_text' | 'square_icon_with_text_below';
3
+ variant: 'square_icon_with_text';
4
4
  label: string;
5
5
  }
6
6
  interface WithoutLabel {
@@ -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, SuggestionGroup };
43
+ export { FloatingSearchBar };
44
44
  export type { Suggestion };
@@ -1,6 +1,5 @@
1
1
  export * from './blackLink/BlackLink';
2
2
  export * from './buttonWithPopover/ButtonWithPopover';
3
- export * from './charts';
4
3
  export * from './contextMenu/ContextMenu';
5
4
  export * from './contextMenuPopover/DataInfoButton';
6
5
  export * from './copyToClipboard/CopyToClipboard';
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties } from 'react';
1
+ import React from 'react';
2
2
  import { LayerInfo } from '@types';
3
3
  interface MainLegendProps {
4
4
  /**
@@ -9,14 +9,6 @@ interface MainLegendProps {
9
9
  * Layer information
10
10
  */
11
11
  layers: LayerInfo[];
12
- /**
13
- * Styling for the main legend
14
- */
15
- legendStyle?: CSSProperties;
16
- /**
17
- * Styling for the content of the legend
18
- */
19
- legendContentStyle?: CSSProperties;
20
12
  }
21
- declare function MainLegend({ legends, layers, legendStyle, legendContentStyle }: MainLegendProps): JSX.Element;
13
+ declare function MainLegend({ legends, layers }: MainLegendProps): JSX.Element;
22
14
  export { MainLegend };
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties } from 'react';
1
+ import React from 'react';
2
2
  interface LayerLegendProps {
3
3
  /**
4
4
  * Layer title
@@ -24,10 +24,6 @@ interface LayerLegendProps {
24
24
  * Used to disable layer legend usage
25
25
  */
26
26
  disabled?: boolean;
27
- /**
28
- * Styling for the content of the legend
29
- */
30
- style?: CSSProperties;
31
27
  }
32
- declare function LayerLegend({ title, iconName, itemsCount, itemsTitle, children, disabled, style }: LayerLegendProps): JSX.Element;
28
+ declare function LayerLegend({ title, iconName, itemsCount, itemsTitle, children, disabled }: LayerLegendProps): JSX.Element;
33
29
  export { LayerLegend };
@@ -1,4 +1,3 @@
1
- import { SuggestionGroup } from '../components';
2
1
  export type KeyboardEvents = {
3
2
  up?: Function;
4
3
  right?: Function;
@@ -7,12 +6,16 @@ export type KeyboardEvents = {
7
6
  enter?: Function;
8
7
  escape?: Function;
9
8
  };
10
- declare const useKeyboardNavigation: (keyboardEvents: KeyboardEvents, listenerTarget?: HTMLElement | Document) => void;
9
+ declare const useListNavigator: (listLength: number, initialIndex?: number, keyboardEvents?: KeyboardEvents, listenerTarget?: Document | HTMLElement) => number;
11
10
  /**
12
- * Handles keyboard navigation and key events in the floating search bar suggestions.
11
+ * 1. On open: focus should be undefined/inactive. (list should scroll/show selected item if any).
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?
13
15
  */
14
- declare const useSearchBarSectionNavigator: (sections: SuggestionGroup[], initialSelected: number, keyboardEvents: KeyboardEvents, listenerTarget?: HTMLElement | Document) => {
16
+ declare const useSectionNavigator: (sections: any[], initialSelected: number, keyboardEvents: KeyboardEvents, listenerTarget?: HTMLElement | Document) => {
15
17
  focusedSection: number;
16
18
  focusedOption: number;
17
19
  };
18
- export { useSearchBarSectionNavigator, useKeyboardNavigation };
20
+ declare const useKeyboardNavigation: (keyboardEvents: KeyboardEvents, listenerTarget?: HTMLElement | Document) => void;
21
+ export { useListNavigator, useSectionNavigator, useKeyboardNavigation };
@@ -3,5 +3,3 @@ export declare const robim_external_ald: IconData;
3
3
  export declare const robim_external_timp: IconData;
4
4
  export declare const robim_external_timp_text: IconData;
5
5
  export declare const robim_external_iwit: IconData;
6
- export declare const robim_external_methane_sensor: IconData;
7
- export declare const robim_external_satellite: IconData;