@equinor/echo-components 0.7.7 → 0.7.10

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,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface LinkProps {
3
3
  className?: string;
4
4
  /** The external link. */
@@ -8,5 +8,5 @@ interface LinkProps {
8
8
  /** If true, the link is opened in the same window or tab. */
9
9
  preserveTab?: boolean;
10
10
  }
11
- declare const BlackLink: ({ className, href, linkText, preserveTab }: LinkProps) => JSX.Element;
11
+ declare const BlackLink: ({ className, href, linkText, preserveTab }: LinkProps) => React.JSX.Element;
12
12
  export { BlackLink };
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  /// <reference types="chart.js" />
3
2
  import Chart, { ChartData, Defaults } from 'chart.js/auto';
3
+ import React from 'react';
4
4
  import { ChartCallbacks, LineChartConfig } from '../../../types/charts';
5
5
  interface Props {
6
6
  initialSize: Chart.ChartSize;
@@ -17,5 +17,5 @@ interface Props {
17
17
  lineChartConfig?: LineChartConfig;
18
18
  onChartInstance?: (chartInstance: Chart | undefined) => void;
19
19
  }
20
- declare function LineChart({ initialSize, chartDataSet, chartTitle, xAxisTitle, yAxisTitle, id, testId, chartConfigs, lineChartConfig, onChartInstance }: Props): JSX.Element;
20
+ declare function LineChart({ initialSize, chartDataSet, chartTitle, xAxisTitle, yAxisTitle, id, testId, chartConfigs, lineChartConfig, onChartInstance }: Props): React.JSX.Element;
21
21
  export { LineChart };
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import { TooltipOptions } from './useTooltip';
3
3
  declare function Tooltip({ children, ...options }: {
4
4
  children: ReactNode;
5
- } & TooltipOptions): JSX.Element;
5
+ } & TooltipOptions): React.JSX.Element;
6
6
  declare const TooltipAnchor: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & {
7
7
  asChild?: boolean | undefined;
8
8
  }, "ref"> & React.RefAttributes<HTMLElement>>;
@@ -11,33 +11,39 @@ declare function useTooltip({ initialOpen, placement, open: controlledOpen, onOp
11
11
  placement: Placement;
12
12
  strategy: import("@floating-ui/react").Strategy;
13
13
  middlewareData: import("@floating-ui/react").MiddlewareData;
14
- x: number | null;
15
- y: number | null;
14
+ x: number;
15
+ y: number;
16
+ isPositioned: boolean;
16
17
  update: () => void;
17
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
18
- floating: (node: HTMLElement | null) => void;
19
- positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
18
+ floatingStyles: import("react").CSSProperties;
19
+ refs: {
20
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
21
+ floating: import("react").MutableRefObject<HTMLElement | null>;
22
+ setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
23
+ setFloating: (node: HTMLElement | null) => void;
24
+ } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
25
+ elements: {
26
+ reference: import("@floating-ui/react-dom").ReferenceType | null;
27
+ floating: HTMLElement | null;
28
+ } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
20
29
  context: {
21
- x: number | null;
22
- y: number | null;
30
+ x: number;
31
+ y: number;
23
32
  update: () => void;
24
33
  placement: Placement;
25
34
  strategy: import("@floating-ui/react").Strategy;
26
35
  middlewareData: import("@floating-ui/react").MiddlewareData;
27
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
28
- floating: (node: HTMLElement | null) => void;
29
36
  isPositioned: boolean;
37
+ floatingStyles: import("react").CSSProperties;
30
38
  open: boolean;
31
- onOpenChange: (open: boolean) => void;
39
+ onOpenChange: (open: boolean, event?: Event | undefined) => void;
32
40
  events: import("@floating-ui/react").FloatingEvents;
33
41
  dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
34
42
  nodeId: string | undefined;
43
+ floatingId: string;
35
44
  refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
36
45
  elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
37
46
  };
38
- refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
39
- elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
40
- isPositioned: boolean;
41
47
  getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
42
48
  getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
43
49
  getItemProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
@@ -49,33 +55,39 @@ declare const useTooltipContext: () => {
49
55
  placement: Placement;
50
56
  strategy: import("@floating-ui/react").Strategy;
51
57
  middlewareData: import("@floating-ui/react").MiddlewareData;
52
- x: number | null;
53
- y: number | null;
58
+ x: number;
59
+ y: number;
60
+ isPositioned: boolean;
54
61
  update: () => void;
55
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
56
- floating: (node: HTMLElement | null) => void;
57
- positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
62
+ floatingStyles: import("react").CSSProperties;
63
+ refs: {
64
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
65
+ floating: import("react").MutableRefObject<HTMLElement | null>;
66
+ setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
67
+ setFloating: (node: HTMLElement | null) => void;
68
+ } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
69
+ elements: {
70
+ reference: import("@floating-ui/react-dom").ReferenceType | null;
71
+ floating: HTMLElement | null;
72
+ } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
58
73
  context: {
59
- x: number | null;
60
- y: number | null;
74
+ x: number;
75
+ y: number;
61
76
  update: () => void;
62
77
  placement: Placement;
63
78
  strategy: import("@floating-ui/react").Strategy;
64
79
  middlewareData: import("@floating-ui/react").MiddlewareData;
65
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
66
- floating: (node: HTMLElement | null) => void;
67
80
  isPositioned: boolean;
81
+ floatingStyles: import("react").CSSProperties;
68
82
  open: boolean;
69
- onOpenChange: (open: boolean) => void;
83
+ onOpenChange: (open: boolean, event?: Event | undefined) => void;
70
84
  events: import("@floating-ui/react").FloatingEvents;
71
85
  dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
72
86
  nodeId: string | undefined;
87
+ floatingId: string;
73
88
  refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
74
89
  elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
75
90
  };
76
- refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
77
- elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
78
- isPositioned: boolean;
79
91
  getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
80
92
  getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
81
93
  getItemProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
@@ -39,6 +39,6 @@ interface SuggestionGroupProps {
39
39
  onClick: (suggestion: Suggestion) => void;
40
40
  focusedOption: number;
41
41
  }
42
- declare function SuggestionGroup({ suggestionGroup, onClick, focusedOption }: SuggestionGroupProps): JSX.Element;
42
+ declare function SuggestionGroup({ suggestionGroup, onClick, focusedOption }: SuggestionGroupProps): React.JSX.Element;
43
43
  export { FloatingSearchBar, SuggestionGroup };
44
44
  export type { Suggestion };
@@ -1,5 +1,5 @@
1
1
  import React, { CSSProperties } from 'react';
2
- import { LayerInfo } from '@types';
2
+ import { LayerInfo } from '../../types';
3
3
  interface MainLegendProps {
4
4
  /**
5
5
  * Layer legends appearing above the main legend
@@ -18,5 +18,5 @@ interface MainLegendProps {
18
18
  */
19
19
  legendContentStyle?: CSSProperties;
20
20
  }
21
- declare function MainLegend({ legends, layers, legendStyle, legendContentStyle }: MainLegendProps): JSX.Element;
21
+ declare function MainLegend({ legends, layers, legendStyle, legendContentStyle }: MainLegendProps): React.JSX.Element;
22
22
  export { MainLegend };
@@ -29,5 +29,5 @@ interface LayerLegendProps {
29
29
  */
30
30
  style?: CSSProperties;
31
31
  }
32
- declare function LayerLegend({ title, iconName, itemsCount, itemsTitle, children, disabled, style }: LayerLegendProps): JSX.Element;
32
+ declare function LayerLegend({ title, iconName, itemsCount, itemsTitle, children, disabled, style }: LayerLegendProps): React.JSX.Element;
33
33
  export { LayerLegend };
@@ -39,6 +39,8 @@ interface ListItemBaseProps {
39
39
  */
40
40
  as?: React.ElementType;
41
41
  onCardClick?: () => void;
42
+ /** A url. The presence of this prop will automatically make the enclosing element an a-element. */
43
+ href?: string;
42
44
  /**
43
45
  * Style Modification
44
46
  */
@@ -46,5 +48,5 @@ interface ListItemBaseProps {
46
48
  style?: CSSProperties;
47
49
  }
48
50
  export type ListItemProps = ListItemBaseProps & WithVisualOrIconOptions;
49
- declare function ListItem(props: ListItemProps): JSX.Element;
51
+ declare function ListItem(props: ListItemProps): React.JSX.Element;
50
52
  export { ListItem };
@@ -1,5 +1,5 @@
1
1
  import React, { CSSProperties } from 'react';
2
- import { ExpandableRowProps, IconListItem } from '@types';
2
+ import { ExpandableRowProps, IconListItem } from '../../types';
3
3
  export interface ListRowProps {
4
4
  isDraggable: boolean;
5
5
  item: IconListItem;
@@ -14,6 +14,6 @@ interface SheetProps extends Style {
14
14
  */
15
15
  floating?: boolean;
16
16
  }
17
- declare function Sheet({ side, orientation, floating, children, className, style }: SheetProps): JSX.Element;
17
+ declare function Sheet({ side, orientation, floating, children, className, style }: SheetProps): React.JSX.Element;
18
18
  export type { SheetProps };
19
19
  export { Sheet };
@@ -6,9 +6,9 @@ interface BaseProps {
6
6
  interface SplitViewProps extends BaseProps {
7
7
  children: [React.ReactChild, React.ReactChild | undefined];
8
8
  }
9
- declare function SplitView({ className, style, children }: SplitViewProps): JSX.Element;
9
+ declare function SplitView({ className, style, children }: SplitViewProps): React.JSX.Element;
10
10
  interface RightProps extends BaseProps {
11
11
  children: React.ReactChild;
12
12
  }
13
- declare function Right({ className, style, children }: RightProps): JSX.Element;
13
+ declare function Right({ className, style, children }: RightProps): React.JSX.Element;
14
14
  export { SplitView, Right };
@@ -5,5 +5,5 @@ interface LeftProps {
5
5
  children: React.ReactChild;
6
6
  isMinimizable?: boolean;
7
7
  }
8
- declare function Left({ className, style, isMinimizable, children }: LeftProps): JSX.Element;
8
+ declare function Left({ className, style, isMinimizable, children }: LeftProps): React.JSX.Element;
9
9
  export { Left };
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { WorkOrderItem } from '@types';
2
+ import { WorkOrderItem } from '../../types';
3
3
  export interface WorkOrderListItemProps {
4
4
  workOrder: WorkOrderItem;
5
5
  onCardClick?: () => void;
6
6
  itemAction?: React.ReactNode;
7
7
  isHeader?: boolean;
8
8
  }
9
- declare function WorkOrderListItem(props: WorkOrderListItemProps): JSX.Element;
9
+ declare function WorkOrderListItem(props: WorkOrderListItemProps): React.JSX.Element;
10
10
  export { WorkOrderListItem };
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface WorkOrderStatusLabelProps {
3
3
  isActive: boolean;
4
4
  }
5
- export declare function WorkOrderStatusLabel({ isActive }: WorkOrderStatusLabelProps): JSX.Element;
5
+ export declare function WorkOrderStatusLabel({ isActive }: WorkOrderStatusLabelProps): React.JSX.Element;
6
6
  export {};