@equinor/echo-components 0.8.0-beta-9 → 0.8.0
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/README.md +29 -7
- package/index.cjs.d.ts +1 -1
- package/index.cjs.js +1 -1
- package/package.json +1 -1
- package/src/components/pcMatrix/PCMatrix.d.ts +3 -3
- package/src/components/searchBar/floatingSearchBar/FloatingSearchBar.d.ts +5 -3
- package/src/components/searchBar/responsiveSearchBar/ResponsiveSearchBar.d.ts +3 -1
- package/src/components/sidesheet/index.d.ts +1 -1
- package/src/components/sidesheet/sheet/Sheet.d.ts +1 -1
- package/src/components/sidesheet/sheet/utils.d.ts +1 -1
- package/src/components/sidesheet/sheetTopArea/SheetTopArea.d.ts +9 -1
- package/src/icons/echoAssets/badges.d.ts +3 -0
- package/src/icons/echoAssets/index.d.ts +4 -2
- package/src/icons/echoAssets/subsea.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
type RiskLevel = 'low' | 'medium' | 'high';
|
|
2
|
-
interface PCMatrixProps {
|
|
1
|
+
export type RiskLevel = 'low' | 'medium' | 'high';
|
|
2
|
+
export interface PCMatrixProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
consequence: RiskLevel;
|
|
5
5
|
probability: RiskLevel;
|
|
6
6
|
}
|
|
7
|
+
export type RiskTuple = [number, number];
|
|
7
8
|
export declare const PCMatrix: ({ consequence, probability, className }: PCMatrixProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { Suggestion, SuggestionGroup } from '../common/types';
|
|
3
3
|
export interface FloatingSearchBarProps {
|
|
4
4
|
ariaLabel?: string;
|
|
@@ -16,13 +16,15 @@ export interface FloatingSearchBarProps {
|
|
|
16
16
|
suggestionGroups?: SuggestionGroup[];
|
|
17
17
|
onSuggestionClick: (suggestion: Suggestion) => void;
|
|
18
18
|
isLoading: boolean;
|
|
19
|
+
preOpenSuggestionsGroup?: boolean;
|
|
20
|
+
defaultValue?: string;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Floating search bar
|
|
22
24
|
*
|
|
23
25
|
* @param {FloatingSearchBarProps} {
|
|
24
26
|
* }
|
|
25
|
-
* @return {*} {
|
|
27
|
+
* @return {*} {JSX.Element}
|
|
26
28
|
*/
|
|
27
|
-
declare const FloatingSearchBar: ({ ariaLabel, placeholder, onSearchQueryChange, suggestionGroups, onSuggestionClick, isLoading }: FloatingSearchBarProps) =>
|
|
29
|
+
declare const FloatingSearchBar: ({ ariaLabel, placeholder, onSearchQueryChange, suggestionGroups, onSuggestionClick, isLoading, preOpenSuggestionsGroup, defaultValue }: FloatingSearchBarProps) => JSX.Element;
|
|
28
30
|
export { FloatingSearchBar };
|
|
@@ -16,6 +16,8 @@ export interface Props extends React.HTMLProps<HTMLFormElement> {
|
|
|
16
16
|
suggestionGroups?: SuggestionGroup[];
|
|
17
17
|
onSuggestionClick: (suggestion: Suggestion) => void;
|
|
18
18
|
isLoading: boolean;
|
|
19
|
+
preOpenSuggestionsGroup?: boolean;
|
|
20
|
+
defaultValue?: string;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Floating search bar
|
|
@@ -24,5 +26,5 @@ export interface Props extends React.HTMLProps<HTMLFormElement> {
|
|
|
24
26
|
* }
|
|
25
27
|
* @return {*} {JSX.Element}
|
|
26
28
|
*/
|
|
27
|
-
declare const ResponsiveSearchBar:
|
|
29
|
+
declare const ResponsiveSearchBar: React.FC<Props>;
|
|
28
30
|
export { ResponsiveSearchBar };
|
|
@@ -7,5 +7,5 @@ interface SideSheetProps extends SheetProps, SheetTopAreaProps {
|
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}
|
|
9
9
|
declare function SideSheet({ open, side, orientation, floating, children, className, style, ...topBarProps }: SideSheetProps): JSX.Element | null;
|
|
10
|
-
export type { SideSheetProps };
|
|
11
10
|
export { SideSheet, SideSheetOrientation };
|
|
11
|
+
export type { SideSheetProps };
|
|
@@ -15,5 +15,5 @@ interface SheetProps extends Style {
|
|
|
15
15
|
floating?: boolean;
|
|
16
16
|
}
|
|
17
17
|
declare function Sheet({ side, orientation, floating, children, className, style }: SheetProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export type { SheetProps };
|
|
19
18
|
export { Sheet };
|
|
19
|
+
export type { SheetProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SideSheetOrientation } from '../enums';
|
|
2
|
-
export declare function GetSheetContainerClass(side?: 'left' | 'right', orientation?: SideSheetOrientation, floating?: boolean
|
|
2
|
+
export declare function GetSheetContainerClass(side?: 'left' | 'right', orientation?: SideSheetOrientation, floating?: boolean): string;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SideSheetOrientation } from '../enums';
|
|
3
|
+
type EnabledOrientations = {
|
|
4
|
+
vertical?: boolean;
|
|
5
|
+
horizontal?: boolean;
|
|
6
|
+
fullscreen?: boolean;
|
|
7
|
+
};
|
|
3
8
|
interface SheetTopAreaProps extends Partial<SheetOrientationActionsProps> {
|
|
4
9
|
closeSheet?: () => void;
|
|
5
10
|
previous?: React.ReactNode;
|
|
11
|
+
/** If omitted, all orientation toggles are rendered. */
|
|
12
|
+
enabledOrientations?: EnabledOrientations;
|
|
6
13
|
}
|
|
7
|
-
declare function SheetTopArea({ orientation, onOrientationChange, closeSheet, previous }: SheetTopAreaProps): JSX.Element | null;
|
|
14
|
+
declare function SheetTopArea({ orientation, onOrientationChange, closeSheet, previous, enabledOrientations }: SheetTopAreaProps): JSX.Element | null;
|
|
8
15
|
interface SheetOrientationActionsProps {
|
|
9
16
|
orientation: SideSheetOrientation;
|
|
17
|
+
enabledOrientations: EnabledOrientations;
|
|
10
18
|
/**
|
|
11
19
|
* Providing this function allows the developer to control sheet orientation.
|
|
12
20
|
*/
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export * from './badges';
|
|
1
2
|
export * from './external';
|
|
2
3
|
export * from './general';
|
|
4
|
+
export * from './maps';
|
|
5
|
+
export * from './misc';
|
|
3
6
|
export * from './notifications';
|
|
4
7
|
export * from './punches';
|
|
8
|
+
export * from './subsea';
|
|
5
9
|
export * from './workOrders';
|
|
6
|
-
export * from './misc';
|
|
7
|
-
export * from './maps';
|