@equinor/echo-components 0.5.19 → 0.5.24

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.
@@ -17,7 +17,24 @@ declare function useTooltip({ initialOpen, placement, open: controlledOpen, onOp
17
17
  reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
18
18
  floating: (node: HTMLElement | null) => void;
19
19
  positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
20
- context: import("@floating-ui/react").FloatingContext<import("@floating-ui/react").ReferenceType>;
20
+ context: {
21
+ x: number | null;
22
+ y: number | null;
23
+ update: () => void;
24
+ placement: Placement;
25
+ strategy: import("@floating-ui/react").Strategy;
26
+ middlewareData: import("@floating-ui/react").MiddlewareData;
27
+ reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
28
+ floating: (node: HTMLElement | null) => void;
29
+ isPositioned: boolean;
30
+ open: boolean;
31
+ onOpenChange: (open: boolean) => void;
32
+ events: import("@floating-ui/react").FloatingEvents;
33
+ dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
34
+ nodeId: string | undefined;
35
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
36
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
37
+ };
21
38
  refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
22
39
  elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
23
40
  isPositioned: boolean;
@@ -38,7 +55,24 @@ declare const useTooltipContext: () => {
38
55
  reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
39
56
  floating: (node: HTMLElement | null) => void;
40
57
  positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
41
- context: import("@floating-ui/react").FloatingContext<import("@floating-ui/react").ReferenceType>;
58
+ context: {
59
+ x: number | null;
60
+ y: number | null;
61
+ update: () => void;
62
+ placement: Placement;
63
+ strategy: import("@floating-ui/react").Strategy;
64
+ middlewareData: import("@floating-ui/react").MiddlewareData;
65
+ reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
66
+ floating: (node: HTMLElement | null) => void;
67
+ isPositioned: boolean;
68
+ open: boolean;
69
+ onOpenChange: (open: boolean) => void;
70
+ events: import("@floating-ui/react").FloatingEvents;
71
+ dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
72
+ nodeId: string | undefined;
73
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
74
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
75
+ };
42
76
  refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
43
77
  elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
44
78
  isPositioned: boolean;
@@ -1,5 +1,6 @@
1
1
  export * from './menuButton/MenuButton';
2
2
  export * from './panel/Panel';
3
3
  export * from './panelContent/PanelContent';
4
+ export * from './panelContent/PanelContentWrapper';
4
5
  export * from './PanelStore';
5
6
  export * from './panelWrapper/PanelWrapper';
@@ -20,5 +20,5 @@ interface MenuButtonProps {
20
20
  * }
21
21
  * @return {*} {JSX.Element}
22
22
  */
23
- declare const MenuButton: React.ForwardRefExoticComponent<MenuButtonProps & React.RefAttributes<HTMLButtonElement | null>>;
23
+ export declare const MenuButton: React.ForwardRefExoticComponent<MenuButtonProps & React.RefAttributes<HTMLButtonElement | null>>;
24
24
  export default MenuButton;
@@ -8,7 +8,14 @@ interface PanelProps {
8
8
  * The actual right side panel. This component wraps the panel with a panel state
9
9
  *
10
10
  * @param {PanelProps} {
11
- * menuItems, the items to be displayed in the menu and its belonging panels
11
+ * menuItems: the items to be displayed in the menu and its belonging panels
12
+ * labelId: the id of the menuItems
13
+ * label: the buttons label visible ot the user. Truncated if too long
14
+ * icon: the icon displayed for the button
15
+ * skipPanelContent: if true you have to provide your own menuButton and panel content
16
+ * isBottomItem: places the menuButton for this item at the bottom of the menu (desktop), has no effect on mobile.
17
+ * panelSize: decides the size of the panel. Narrow is 320 and wide is 480. Wide is default
18
+ * component: The panel component to display when panel is actibe
12
19
  * header, the header that will be displayed on mobile.
13
20
  * If its a string then it will only display a header text. But it can also be a component with self defined html
14
21
  * }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ interface PanelContentWrapperProps {
3
+ children: React.ReactNode;
4
+ }
5
+ /**
6
+ * Component that can be used to wrap content within a panel
7
+ * This will give the whole content a scrollbar
8
+ * Has padding of 16px
9
+ *
10
+ * @param {PanelContentWrapperProps} {
11
+ * children, the panels content
12
+ * }
13
+ * @return {*} {JSX.Element}
14
+ */
15
+ export declare const PanelContentWrapper: React.FC<PanelContentWrapperProps>;
16
+ export default PanelContentWrapper;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  interface WorkOrderStatusLabelProps {
3
- workOrderStatus: string;
3
+ workOrderStatus?: string;
4
4
  }
5
5
  export declare function WorkOrderStatusLabel({ workOrderStatus }: WorkOrderStatusLabelProps): JSX.Element;
6
- export declare function resolveStatusColor(workOrderStatus: string): string;
6
+ export declare function resolveStatusColor(workOrderStatus?: string): string;
7
7
  export declare const WorkOrderStatusColorMap: {
8
8
  completed: string;
9
9
  active: string;