@equinor/echo-components 0.7.12 → 0.7.14

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.
@@ -12,13 +12,13 @@ export * from './echoCard/index';
12
12
  export * from './echoHeader/EchoHeader';
13
13
  export * from './echoTooltip';
14
14
  export * from './floatingActionButton/FloatingActionButton';
15
- export * from './floatingSearchBar/FloatingSearchBar';
16
15
  export * from './inlineTagIconLink/InlineTagIconLink';
17
16
  export * from './legend';
18
17
  export * from './listItem';
19
18
  export * from './listRow/ListRow';
20
19
  export * from './pcMatrix/PCMatrix';
21
20
  export * from './rightPanel';
21
+ export * from './searchBar';
22
22
  export * from './sidebarButton/SidebarButton';
23
23
  export * from './sidesheet';
24
24
  export * from './splitView';
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SearchSuggestionsProps } from './types';
3
+ declare function SearchSuggestions({ suggestionGroups, containerRef, onClick, styles }: SearchSuggestionsProps): React.JSX.Element;
4
+ export { SearchSuggestions };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SuggestionGroupProps } from './types';
3
+ declare function SuggestionGroup({ suggestionGroup, onClick, focusedOption, styles }: SuggestionGroupProps): React.JSX.Element;
4
+ export { SuggestionGroup };
@@ -0,0 +1,26 @@
1
+ export interface Suggestion {
2
+ label: string;
3
+ id: string;
4
+ iconName: string;
5
+ }
6
+ export interface SuggestionGroup {
7
+ title?: string;
8
+ id: string;
9
+ options: Suggestion[];
10
+ }
11
+ export interface SearchSuggestionsProps {
12
+ suggestionGroups: SuggestionGroup[];
13
+ containerRef: HTMLFormElement | null;
14
+ onClick: (suggestion: Suggestion) => void;
15
+ styles: {
16
+ readonly [key: string]: string;
17
+ };
18
+ }
19
+ export interface SuggestionGroupProps {
20
+ suggestionGroup: SuggestionGroup;
21
+ onClick: (suggestion: Suggestion) => void;
22
+ focusedOption: number;
23
+ styles: {
24
+ readonly [key: string]: string;
25
+ };
26
+ }
@@ -1,14 +1,5 @@
1
1
  import React from 'react';
2
- interface Suggestion {
3
- label: string;
4
- id: string;
5
- iconName: string;
6
- }
7
- interface SuggestionGroup {
8
- title?: string;
9
- id: string;
10
- options: Suggestion[];
11
- }
2
+ import { Suggestion, SuggestionGroup } from '../common/types';
12
3
  export interface FloatingSearchBarProps {
13
4
  ariaLabel?: string;
14
5
  /**
@@ -34,11 +25,4 @@ export interface FloatingSearchBarProps {
34
25
  * @return {*} {JSX.Element}
35
26
  */
36
27
  declare const FloatingSearchBar: React.FC<FloatingSearchBarProps>;
37
- interface SuggestionGroupProps {
38
- suggestionGroup: SuggestionGroup;
39
- onClick: (suggestion: Suggestion) => void;
40
- focusedOption: number;
41
- }
42
- declare function SuggestionGroup({ suggestionGroup, onClick, focusedOption }: SuggestionGroupProps): React.JSX.Element;
43
- export { FloatingSearchBar, SuggestionGroup };
44
- export type { Suggestion };
28
+ export { FloatingSearchBar };
@@ -0,0 +1,3 @@
1
+ export * from './common/types';
2
+ export * from './floatingSearchBar/FloatingSearchBar';
3
+ export * from './responsiveSearchBar/ResponsiveSearchBar';
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { Suggestion, SuggestionGroup } from '../common/types';
3
+ export interface Props extends React.HTMLProps<HTMLFormElement> {
4
+ ariaLabel?: string;
5
+ /**
6
+ * Placeholder text
7
+ */
8
+ placeholder?: string;
9
+ /**
10
+ * Callback for when the search query changes
11
+ */
12
+ onSearchQueryChange: (value: string) => void;
13
+ /**
14
+ * Suggestions that matches the search query by groups
15
+ */
16
+ suggestionGroups?: SuggestionGroup[];
17
+ onSuggestionClick: (suggestion: Suggestion) => void;
18
+ isLoading: boolean;
19
+ }
20
+ /**
21
+ * Floating search bar
22
+ *
23
+ * @param {Props} {
24
+ * }
25
+ * @return {*} {JSX.Element}
26
+ */
27
+ declare const ResponsiveSearchBar: React.FC<Props>;
28
+ export { ResponsiveSearchBar };
@@ -4,6 +4,7 @@ interface LeftProps {
4
4
  style?: CSSProperties;
5
5
  children: React.ReactChild;
6
6
  isMinimizable?: boolean;
7
+ defaultMinimized?: boolean;
7
8
  }
8
- declare function Left({ className, style, isMinimizable, children }: LeftProps): React.JSX.Element;
9
+ declare function Left({ className, style, isMinimizable, defaultMinimized, children }: LeftProps): React.JSX.Element;
9
10
  export { Left };