@equinor/echo-components 6.2.0 → 6.2.1-edsv2-beta-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/{1dd428dbc8752224.svg → 04852fb8014a9692.svg} +19 -19
- package/{246374c510469011.svg → 0a6a2110d0267d69.svg} +142 -142
- package/{8ddc7d44de9795fc.svg → bb2d3aa591e687f9.svg} +112 -112
- package/{c283d1a6c49e1d97.svg → fb72d3eecaa74688.svg} +82 -82
- package/index.cjs.js +1 -1
- package/index.d.ts +1 -1
- package/package.json +5 -5
- package/src/components/legend/MainLegend.d.ts +6 -6
- package/src/components/legend/MainLegend.utils.d.ts +9 -0
- package/src/components/legend/useMaxIconsOnLegend.d.ts +10 -0
- package/src/components/rightPanel/panelWrapper/OverflowPanelComponent.d.ts +6 -0
- package/src/components/rightPanel/panelWrapper/panelWrapper.utils.d.ts +4 -0
- package/src/components/selectTextOnFocusAutocomplete/SelectTextOnFocusAutocomplete.d.ts +3 -2
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./src
|
|
1
|
+
export * from "./src\\index";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-components",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.1-edsv2-beta-1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"chart.js": "4.5.1",
|
|
6
6
|
"react-datepicker": "9.1.0",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"react-window": "1.8.11"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@equinor/echo-utils": ">= 6.2.
|
|
12
|
-
"@equinor/eds-core-react": "
|
|
13
|
-
"@equinor/eds-icons": "
|
|
14
|
-
"@equinor/eds-tokens": "2.
|
|
11
|
+
"@equinor/echo-utils": ">= 6.2.1 < 7.0.0",
|
|
12
|
+
"@equinor/eds-core-react": "2.6.1",
|
|
13
|
+
"@equinor/eds-icons": "1.4.0",
|
|
14
|
+
"@equinor/eds-tokens": "2.2.0",
|
|
15
15
|
"classnames": "2.5.1",
|
|
16
16
|
"lodash": ">= 4.17.21 < 5",
|
|
17
17
|
"react": ">= 19.2.4",
|
|
@@ -4,27 +4,27 @@ interface MainLegendProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* Layer legends appearing above the main legend
|
|
6
6
|
*/
|
|
7
|
-
legends: React.ReactNode[];
|
|
7
|
+
readonly legends: readonly React.ReactNode[];
|
|
8
8
|
/**
|
|
9
9
|
* Layer information
|
|
10
10
|
*/
|
|
11
|
-
layers: LayerInfo[];
|
|
11
|
+
readonly layers: readonly LayerInfo[];
|
|
12
12
|
/**
|
|
13
13
|
* Styling for the main legend
|
|
14
14
|
*/
|
|
15
|
-
legendStyle?: CSSProperties;
|
|
15
|
+
readonly legendStyle?: CSSProperties;
|
|
16
16
|
/**
|
|
17
17
|
* Styling for the content of the legend
|
|
18
18
|
*/
|
|
19
|
-
legendContentStyle?: CSSProperties;
|
|
19
|
+
readonly legendContentStyle?: CSSProperties;
|
|
20
20
|
/**
|
|
21
21
|
* Custom styling for the legend.
|
|
22
22
|
*/
|
|
23
|
-
legendClassName?: string;
|
|
23
|
+
readonly legendClassName?: string;
|
|
24
24
|
/**
|
|
25
25
|
* Custom styling for the legend content.
|
|
26
26
|
*/
|
|
27
|
-
legendContentClassName?: string;
|
|
27
|
+
readonly legendContentClassName?: string;
|
|
28
28
|
}
|
|
29
29
|
declare const MainLegend: ({ legends, layers, legendStyle, legendContentStyle, legendContentClassName, legendClassName }: MainLegendProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export { MainLegend };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LayerInfo } from '../../types';
|
|
2
|
+
export declare const DEFAULT_MAX_ICONS_ON_LEGEND = 5;
|
|
3
|
+
export declare const DEFAULT_REM_SIZE_PX = 16;
|
|
4
|
+
export declare const LEGEND_ICON_WIDTH_REM = 1.125;
|
|
5
|
+
export declare const LEGEND_ICON_MARGIN_REM = 0.625;
|
|
6
|
+
export declare const LEGEND_ICON_WIDTH_PX = 18;
|
|
7
|
+
export declare const LEGEND_ICON_WIDTH_WITH_MARGIN_REM: number;
|
|
8
|
+
export declare function calculateMaxIconsOnLegend(containerWidthPx: number, remSizePx: number): number;
|
|
9
|
+
export declare function separateLayers(layers: readonly LayerInfo[], maxIconsOnLegend: number): readonly [readonly LayerInfo[], readonly LayerInfo[]];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
interface UseMaxIconsOnLegendConfig {
|
|
3
|
+
readonly iconContainer: RefObject<HTMLDivElement | null>;
|
|
4
|
+
readonly isMobile: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface MaxIconsOnLegendState {
|
|
7
|
+
readonly maxIconsOnLegend: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function useMaxIconsOnLegend({ iconContainer, isMobile }: UseMaxIconsOnLegendConfig): MaxIconsOnLegendState;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import type { MenuItem } from '../../../types/menuItem';
|
|
3
|
+
export declare function areMenuItemsEqual(firstMenuItems: readonly MenuItem[], secondMenuItems: readonly MenuItem[]): boolean;
|
|
4
|
+
export declare function setMenuItemsWhenChanged(setMenuItems: Dispatch<SetStateAction<MenuItem[]>>, nextMenuItems: MenuItem[]): void;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Autocomplete } from '@equinor/eds-core-react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
3
|
+
type AutocompleteProps<T> = React.ComponentProps<typeof Autocomplete<T>>;
|
|
4
|
+
type SelectTextOnFocusAutocompleteProps<T> = Omit<AutocompleteProps<T>, 'ref'> & {
|
|
4
5
|
ariaPressed?: boolean;
|
|
5
6
|
style?: React.CSSProperties;
|
|
6
7
|
wrapperClassName?: string;
|
|
7
8
|
children?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
+
};
|
|
9
10
|
/**
|
|
10
11
|
* A reusable component that wraps the EDS Autocomplete in a button.
|
|
11
12
|
* When the button is clicked or activated with keyboard (Enter/Space),
|