@equinor/echo-components 0.9.5 → 0.9.6

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": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "dependencies": {
5
5
  "chart.js": "4.4.0",
6
6
  "react-window": "1.8.9",
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  interface WithLabel {
3
3
  variant: 'square_icon_with_text' | 'square_icon_with_text_below';
4
4
  label: string;
@@ -0,0 +1,54 @@
1
+ import { CSSProperties } from 'react';
2
+ import { ButtonProps } from '@equinor/eds-core-react';
3
+ import { IconData } from '@equinor/eds-icons';
4
+ type FabButtonBaseProps = ButtonProps & {
5
+ active?: boolean;
6
+ /**
7
+ * Will set button as disabled and stop the onClick function from being called
8
+ */
9
+ disabled?: boolean;
10
+ ariaLabel?: string;
11
+ /**
12
+ * Will trigger a tooltip to render with this title
13
+ */
14
+ title?: string;
15
+ /**
16
+ * Default placement is left
17
+ */
18
+ tooltipPlacement?: 'left' | 'right';
19
+ /**
20
+ * Delay for rendering tooltip - default 300ms
21
+ */
22
+ delay?: number;
23
+ /**
24
+ * Styling
25
+ */
26
+ className?: string;
27
+ style?: CSSProperties;
28
+ };
29
+ type FabButtonIconNameProps = FabButtonBaseProps & {
30
+ /**
31
+ * Mutually exclusive with IconData. One of them is required.
32
+ */
33
+ iconName: string;
34
+ /**
35
+ * Mutually exclusive with IconName. One of them is required.
36
+ */
37
+ iconData?: never;
38
+ };
39
+ type FabButtonIconDataProps = FabButtonBaseProps & {
40
+ /**
41
+ * Mutually exclusive with IconData. One of them is required.
42
+ */
43
+ iconName?: never;
44
+ /**
45
+ * Mutually exclusive with IconName. One of them is required.
46
+ */
47
+ iconData: IconData;
48
+ };
49
+ type FabButtonProps = FabButtonIconNameProps | FabButtonIconDataProps;
50
+ /**
51
+ * List item wraps this button as its meant for FabGroup
52
+ */
53
+ export declare function FabButton({ title, tooltipPlacement, delay, className, style, iconName, iconData, active, disabled, ariaLabel, onClick, ...buttonProps }: FabButtonProps): import("react/jsx-runtime").JSX.Element;
54
+ export {};
@@ -0,0 +1,8 @@
1
+ import { CSSProperties } from 'react';
2
+ type FabGroupProps = {
3
+ className?: string;
4
+ style?: CSSProperties;
5
+ children: React.ReactNode;
6
+ };
7
+ export declare function FabGroup({ className, style, children }: FabGroupProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import { FabButton as Button } from './FabButton';
2
+ import { FabGroup as Group } from './FabGroup';
3
+ export declare const Fab: {
4
+ Button: typeof Button;
5
+ Group: typeof Group;
6
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./FloatingActionButton";
2
+ export * from "./fabGroup";
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { TabListProps, TabPanelsProps, TabsProps } from '@equinor/eds-core-react';
3
+ /** The topmost wrapper element for the tab view.*/
4
+ export declare function TabView(props: TabsProps): import("react/jsx-runtime").JSX.Element;
5
+ /** Returns the parent element of the tabs themselves. */
6
+ export declare function Tabs(props: TabListProps): import("react/jsx-runtime").JSX.Element;
7
+ /** Returns a button that acts like a tab button in a tab list. */
8
+ export declare const Tab: import("react").ForwardRefExoticComponent<{
9
+ active?: boolean | undefined;
10
+ disabled?: boolean | undefined;
11
+ as?: import("react").ElementType | undefined;
12
+ } & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<unknown>>;
13
+ /** Returns the parent of the tab-sectioned content. */
14
+ export declare function TabPanels(props: TabPanelsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { Tab, TabPanels, TabView, Tabs } from './HorizontalTabView';
3
+ declare const EDSPanel: import("react").ForwardRefExoticComponent<{
4
+ hidden?: boolean | undefined;
5
+ } & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
6
+ interface HorizontalTabsProps {
7
+ HorizontalTabs: typeof TabView;
8
+ Tabs: typeof Tabs;
9
+ Tab: typeof Tab;
10
+ TabPanels: typeof TabPanels;
11
+ TabPanel: typeof EDSPanel;
12
+ }
13
+ export declare const HorizontalTabView: HorizontalTabsProps;
14
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export interface CompactIconLinkProps {
3
+ title: string;
4
+ meta: string;
5
+ legendColor?: string;
6
+ onClickHandler: () => void;
7
+ icon?: string | React.ReactNode;
8
+ className?: string;
9
+ }
10
+ export declare const CompactIconLink: ({ title, meta, legendColor, onClickHandler, icon, className, }: CompactIconLinkProps) => JSX.Element;
@@ -10,8 +10,11 @@ export * from './dropdown/Dropdown';
10
10
  export * from './echoBottomBar/EchoBottomBar';
11
11
  export * from './echoCard/index';
12
12
  export * from './echoHeader/EchoHeader';
13
+ export * from './floatingActionButton';
13
14
  export * from './floatingActionButton/FloatingActionButton';
14
- export * from './inlineTagIconLink/InlineTagIconLink';
15
+ export * from './horizontalTabView';
16
+ export * from './iconLink/compactIconLink/CompactIconLink';
17
+ export * from './iconLink/inlineTagIconLink/InlineTagIconLink';
15
18
  export * from './legend';
16
19
  export * from './linkIcon/LinkIcon';
17
20
  export * from './listItem';
@@ -17,6 +17,14 @@ interface MainLegendProps {
17
17
  * Styling for the content of the legend
18
18
  */
19
19
  legendContentStyle?: CSSProperties;
20
+ /**
21
+ * Custom styling for the legend.
22
+ */
23
+ legendClassName?: string;
24
+ /**
25
+ * Custom styling for the legend content.
26
+ */
27
+ legendContentClassName?: string;
20
28
  }
21
- declare function MainLegend({ legends, layers, legendStyle, legendContentStyle }: MainLegendProps): import("react/jsx-runtime").JSX.Element;
29
+ declare function MainLegend({ legends, layers, legendStyle, legendContentStyle, legendContentClassName, legendClassName }: MainLegendProps): import("react/jsx-runtime").JSX.Element;
22
30
  export { MainLegend };
@@ -28,6 +28,10 @@ interface LayerLegendProps {
28
28
  * Styling for the content of the legend
29
29
  */
30
30
  style?: CSSProperties;
31
+ /**
32
+ * Classname for the content of the legend
33
+ */
34
+ className?: string;
31
35
  }
32
- declare function LayerLegend({ title, iconName, itemsCount, itemsTitle, children, disabled, style }: LayerLegendProps): import("react/jsx-runtime").JSX.Element;
36
+ declare function LayerLegend({ title, iconName, itemsCount, itemsTitle, children, disabled, style, className }: LayerLegendProps): import("react/jsx-runtime").JSX.Element;
33
37
  export { LayerLegend };
@@ -1,2 +1,3 @@
1
1
  import { IconData } from '@equinor/eds-icons';
2
2
  export declare const soc_main: IconData;
3
+ export declare const soc_main_filled: IconData;