@equinor/echo-components 6.0.0 → 6.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-components",
3
- "version": "6.0.0",
3
+ "version": "6.2.0",
4
4
  "dependencies": {
5
5
  "chart.js": "4.5.1",
6
6
  "react-datepicker": "9.1.0",
@@ -8,7 +8,7 @@
8
8
  "react-window": "1.8.11"
9
9
  },
10
10
  "peerDependencies": {
11
- "@equinor/echo-utils": ">= 6.0.0 < 7.0.0",
11
+ "@equinor/echo-utils": ">= 6.2.0 < 7.0.0",
12
12
  "@equinor/eds-core-react": "0.49.0",
13
13
  "@equinor/eds-icons": "0.22.0",
14
14
  "@equinor/eds-tokens": "2.1.0",
@@ -0,0 +1,52 @@
1
+ import { type ReactNode } from 'react';
2
+ export { useCompoundListItemContext } from './compoundListItem.context';
3
+ export type { CompoundListItemActionsProps } from './components/CompoundListItemActions';
4
+ export type { CompoundListItemContentProps } from './components/CompoundListItemContent';
5
+ export type { CompoundListItemFooterProps } from './components/CompoundListItemFooter';
6
+ export type { CompoundListItemHelpTextProps } from './components/CompoundListItemHelpText';
7
+ export type { CompoundListItemIconProps } from './components/CompoundListItemIcon';
8
+ export type { CompoundListItemContextValue } from './compoundListItem.context';
9
+ interface CompoundListItemCommonProps {
10
+ readonly children?: ReactNode;
11
+ /**
12
+ * Whether the item is currently active. Defaults to true.
13
+ * When false, the content is dimmed. Action buttons and the navigation
14
+ * chevron keep full opacity so they remain visually interactive.
15
+ * @default true
16
+ */
17
+ readonly isActive?: boolean;
18
+ /**
19
+ * The HTML element to render as the wrapper for the list item. Defaults to 'li'.
20
+ */
21
+ readonly as?: 'li' | 'div';
22
+ }
23
+ /**
24
+ * Non-interactive list item. Use when the item is purely informational and has no actions or navigation.
25
+ * Omits interactive attributes and styling.
26
+ */
27
+ type CompoundListItemStaticProps = CompoundListItemCommonProps;
28
+ /**
29
+ * Clickable list item rendered as a button. Use when the item has an onClick handler but does not navigate to a new page.
30
+ */
31
+ interface CompoundListItemButtonProps extends CompoundListItemCommonProps {
32
+ readonly onClick: () => void;
33
+ /** Accessible label describing the action, e.g. `Open details for 11-AB-1234`. */
34
+ readonly ariaLabel: string;
35
+ }
36
+ interface CompoundListItemLinkProps extends CompoundListItemCommonProps {
37
+ readonly href: string;
38
+ /** Accessible label describing the navigation target, e.g. `Go to details page for 11-AB-1234`. */
39
+ readonly ariaLabel: string;
40
+ }
41
+ export type CompoundListItemBaseProps = CompoundListItemStaticProps | CompoundListItemButtonProps | CompoundListItemLinkProps;
42
+ export declare const CompoundListItem: ((props: CompoundListItemBaseProps) => import("react/jsx-runtime").JSX.Element) & {
43
+ Content: (({ children }: import("./components/CompoundListItemContent").CompoundListItemContentProps) => import("react/jsx-runtime").JSX.Element) & {
44
+ Icon: (props: import("./components/CompoundListItemIcon").CompoundListItemIconProps) => import("react/jsx-runtime").JSX.Element;
45
+ Actions: (({ children }: import("./components/CompoundListItemActions").CompoundListItemActionsProps) => import("react/jsx-runtime").JSX.Element) & {
46
+ Item: ({ children, tooltip }: import("./components/CompoundListItemActionItem").CompoundListItemActionItemProps) => import("react/jsx-runtime").JSX.Element;
47
+ };
48
+ };
49
+ Footer: (({ children }: import("./components/CompoundListItemFooter").CompoundListItemFooterProps) => import("react/jsx-runtime").JSX.Element) & {
50
+ HelpText: ({ children, showWarningIcon }: import("./components/CompoundListItemHelpText").CompoundListItemHelpTextProps) => import("react/jsx-runtime").JSX.Element;
51
+ };
52
+ };
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface CompoundListItemActionItemProps {
3
+ readonly children: ReactNode;
4
+ /** Optional EDS tooltip rendered around the child. */
5
+ readonly tooltip?: string;
6
+ }
7
+ /**
8
+ * Individual action item for CompoundListItem.
9
+ * Meant to be used within `CompoundListItem.Actions` for a consistent structure and
10
+ * styling of row-level actions.
11
+ */
12
+ export declare const CompoundListItemActionItem: ({ children, tooltip }: CompoundListItemActionItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface CompoundListItemActionsProps {
3
+ readonly children: ReactNode;
4
+ }
5
+ export declare const CompoundListItemActions: (({ children }: CompoundListItemActionsProps) => import("react/jsx-runtime").JSX.Element) & {
6
+ Item: ({ children, tooltip }: import("./CompoundListItemActionItem").CompoundListItemActionItemProps) => import("react/jsx-runtime").JSX.Element;
7
+ };
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface CompoundListItemContentProps {
3
+ readonly children: ReactNode;
4
+ }
5
+ /**
6
+ * Content section for CompoundListItem. Contains the icon, main content, and actions.
7
+ * Renders a horizontal row layout. Navigation chevron is shown when parent is clickable.
8
+ */
9
+ export declare const CompoundListItemContent: ({ children }: CompoundListItemContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface CompoundListItemFooterProps {
3
+ readonly children: ReactNode;
4
+ }
5
+ /**
6
+ * Footer section for CompoundListItem, rendered below the main content row but inside the clickable area.
7
+ * Use this for help text, warnings, or any custom content that should appear below the main row.
8
+ */
9
+ export declare const CompoundListItemFooter: ({ children }: CompoundListItemFooterProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface CompoundListItemHelpTextProps {
3
+ readonly children: ReactNode;
4
+ /**
5
+ * If true, shows a warning icon before the help text.
6
+ * @default false
7
+ */
8
+ readonly showWarningIcon?: boolean;
9
+ }
10
+ /**
11
+ * Displays styled text with an optional warning icon.
12
+ */
13
+ export declare const CompoundListItemHelpText: ({ children, showWarningIcon }: CompoundListItemHelpTextProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export interface CompoundListItemIconProps {
2
+ readonly color?: string;
3
+ readonly backgroundColor?: string;
4
+ readonly name: string;
5
+ }
6
+ /**
7
+ * Icon section for CompoundListItem. Renders a circular background with an
8
+ * icon. Colors can be customized via props or fall back to theme defaults.
9
+ */
10
+ export declare const CompoundListItemIcon: (props: CompoundListItemIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export interface CompoundListItemContextValue {
2
+ readonly isClickable: boolean;
3
+ readonly isActive: boolean;
4
+ }
5
+ export declare const CompoundListItemProvider: import("react").Provider<CompoundListItemContextValue | undefined>;
6
+ /**
7
+ * Hook to access CompoundListItem context. Must be used within a CompoundListItem component.
8
+ */
9
+ export declare const useCompoundListItemContext: () => CompoundListItemContextValue;
@@ -3,6 +3,7 @@ export * from './autohiddenContent/AutohiddenContent';
3
3
  export * from './blackLink/BlackLink';
4
4
  export * from './buttonWithPopover/ButtonWithPopover';
5
5
  export * from './charts';
6
+ export * from './compoundListItem/CompoundListItem';
6
7
  export * from './contextMenu/ContextMenu';
7
8
  export * from './contextMenuPopover/DataInfoButton';
8
9
  export * from './copyToClipboard/CopyToClipboard';
@@ -51,7 +52,6 @@ export * from './noDataLabel';
51
52
  export * from './notificationListItem/NotificationListItem';
52
53
  export * from './pcMatrix/PCMatrix';
53
54
  export * from './rightPanel';
54
- export * from './scrollableTabs/ScrollableTabs';
55
55
  export * from './searchBar';
56
56
  export * from './secondaryMarker/SecondaryMarker';
57
57
  export * from './secondaryMarker/SecondaryMarkerExpander';
@@ -0,0 +1,6 @@
1
+ import type { CoordinateItemCardData } from './coordinateItemCard.types';
2
+ interface CoordinateItemCardProps {
3
+ readonly coordinate: CoordinateItemCardData;
4
+ }
5
+ export declare const CoordinateItemCard: ({ coordinate }: CoordinateItemCardProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ export interface CoordinateItemCardData {
2
+ readonly name: string;
3
+ readonly x: number;
4
+ readonly y: number;
5
+ readonly z: number;
6
+ readonly instCode: string;
7
+ readonly plantCode: string;
8
+ readonly relatedToDisplay?: string;
9
+ }
@@ -1,9 +1,11 @@
1
+ export { CoordinateItemCard } from './coordinateItemCard/CoordinateItemCard';
2
+ export type { CoordinateItemCardData } from './coordinateItemCard/coordinateItemCard.types';
1
3
  export { EquipmentItemCard } from './equipmentItemCard/EquipmentItemCard';
2
4
  export type { EquipmentItemCardData } from './equipmentItemCard/equipmentItemCard.types';
3
5
  export { ItemCard } from './itemCard/ItemCard';
4
6
  export { type ItemCardIconItem, type ItemCardIconsProps } from './itemCard/itemCard.types';
5
7
  export { LastRecordedMeasurement } from './measuringPointItemCard/lastRecordedMeasurement/LastRecordedMeasurement';
6
- export type { LastRecordedMeasurementInfo } from './measuringPointItemCard/lastRecordedMeasurement/lastRecordedMeasurement.types';
8
+ export type { LastRecordedMeasurementInfo, MeasurementLabelledText } from './measuringPointItemCard/lastRecordedMeasurement/lastRecordedMeasurement.types';
7
9
  export { MeasuringPointItemCard } from './measuringPointItemCard/MeasuringPointItemCard';
8
10
  export type { MeasuringPointItemCardData } from './measuringPointItemCard/measuringPointItemCard.types';
9
11
  export { NotificationItemCard } from './notificationItemCard/NotificationItemCard';
@@ -3,5 +3,5 @@ interface LastRecordedMeasurementProps {
3
3
  readonly lastRecordedMeasurement: LastRecordedMeasurementInfo;
4
4
  readonly failureMechanismDescription: string | undefined;
5
5
  }
6
- export declare const LastRecordedMeasurement: ({ lastRecordedMeasurement, failureMechanismDescription }: LastRecordedMeasurementProps) => "" | import("react/jsx-runtime").JSX.Element | undefined;
6
+ export declare const LastRecordedMeasurement: ({ lastRecordedMeasurement, failureMechanismDescription }: LastRecordedMeasurementProps) => import("react/jsx-runtime").JSX.Element | undefined;
7
7
  export {};
@@ -1,5 +1,9 @@
1
+ export interface MeasurementLabelledText {
2
+ readonly label: string;
3
+ readonly value: string;
4
+ }
1
5
  export interface LastRecordedMeasurementInfo {
2
- readonly conditionAsText: string | undefined;
3
- readonly codeAsText: string | undefined;
6
+ readonly recordedConditionLabelledText: MeasurementLabelledText | undefined;
7
+ readonly recordedCodeLabelledText: MeasurementLabelledText | undefined;
4
8
  readonly measurementDateTime: string | undefined;
5
9
  }
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  export interface Suggestion {
2
3
  label: string;
3
4
  id: string;
@@ -10,7 +11,7 @@ export interface SuggestionGroup {
10
11
  }
11
12
  export interface SearchSuggestionsProps {
12
13
  suggestionGroups: SuggestionGroup[];
13
- containerRef: HTMLFormElement | null;
14
+ containerRef: React.RefObject<HTMLFormElement | null>;
14
15
  onClick: (suggestion: Suggestion) => void;
15
16
  styles: {
16
17
  readonly [key: string]: string;
@@ -14,6 +14,7 @@ export declare enum TagCategoryType {
14
14
  Signal = "signal",
15
15
  Telecom = "telecom",
16
16
  JunctionBox = "junction box",
17
+ IoT = "iot",
17
18
  Administrative = "administrative"
18
19
  }
19
20
  /**
@@ -31,6 +32,7 @@ export declare enum TagCategoryType {
31
32
  * | 'signal'
32
33
  * | 'telecom'
33
34
  * | 'junction box'
35
+ * | 'iot'
34
36
  * | 'administrative'
35
37
  * @return {*} {React.JSX.Element} Relevant icon for the provided tagCategoryDescription
36
38
  */
@@ -1,12 +0,0 @@
1
- import { TabsProps } from '@equinor/eds-core-react';
2
- import { ReactNode } from 'react';
3
- interface ScrollableTabsProps extends TabsProps {
4
- /** To override styles. */
5
- className?: string;
6
- /** The list of tabs to be rendered. */
7
- tabsListContent: ReactNode[];
8
- /** The list of tab content. Rendered inside EDSTab.Panel */
9
- tabsPanelContent: ReactNode[];
10
- }
11
- declare function ScrollableTabs({ className, tabsListContent, tabsPanelContent, variant }: ScrollableTabsProps): import("react/jsx-runtime").JSX.Element;
12
- export { ScrollableTabs };