@equinor/echo-components 0.11.9 → 0.11.11
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/index.cjs.js +1 -1
- package/package.json +6 -5
- package/src/components/autohiddenContent/AutohiddenContent.d.ts +4 -0
- package/src/components/blackLink/BlackLink.d.ts +9 -3
- package/src/components/copyToClipboard/CopyToClipboard.d.ts +9 -0
- package/src/components/echoCard/Title.d.ts +0 -1
- package/src/components/functionalLocationListItem/FunctionalLocationListItem.d.ts +0 -1
- package/src/components/horizontalTabView/HorizontalTabView.d.ts +21 -6
- package/src/components/horizontalTabView/index.d.ts +0 -1
- package/src/components/iconLink/compactIconLink/CompactIconLink.d.ts +0 -1
- package/src/components/index.d.ts +10 -0
- package/src/components/itemMarker/ChipsContainer.d.ts +10 -0
- package/src/components/itemMarker/ItemMarker.d.ts +46 -0
- package/src/components/itemMarker/ItemMarkerChip.d.ts +9 -0
- package/src/components/itemMarker/ItemMarkerChips.d.ts +10 -0
- package/src/components/itemMarker/ItemMarkerContent.d.ts +14 -0
- package/src/components/itemMarker/ItemMarkerExpanded.d.ts +7 -0
- package/src/components/itemMarker/ItemMarkerIcon.d.ts +12 -0
- package/src/components/itemMarker/MultipleItemMarkers.d.ts +20 -0
- package/src/components/itemMarker/utils/itemMarkerUtils.d.ts +17 -0
- package/src/components/itemMarkerAndPopoverWrapper/itemMarkerAndPopoverWrapper.d.ts +16 -0
- package/src/components/itemMarkerPopover/Pagination.d.ts +7 -0
- package/src/components/itemMarkerPopover/itemMarkerPopover.d.ts +9 -0
- package/src/components/legendChip/legendChip.d.ts +14 -0
- package/src/components/legendSelector/legendSelector.d.ts +17 -0
- package/src/components/legendSelectorMenu/legendSelectorMenu.d.ts +14 -0
- package/src/components/linkIcon/LinkIcon.d.ts +7 -0
- package/src/components/listItem/ListItem.d.ts +7 -1
- package/src/components/markedContent/MarkedContent.d.ts +0 -1
- package/src/components/multilineTabs/MultilineTabs.d.ts +7 -0
- package/src/components/scrollableTabs/ScrollableTabs.d.ts +14 -0
- package/src/components/searchBar/floatingSearchBar/FloatingSearchBar.d.ts +0 -1
- package/src/components/secondaryMarker/SecondaryMarker.d.ts +0 -1
- package/src/components/secondaryMarker/SecondaryMarkerExpander.d.ts +0 -1
- package/src/components/secondaryMarker/SecondaryMarkerWithChip.d.ts +0 -1
- package/src/components/secondaryMarker/SecondaryMarkerWrapper.d.ts +0 -1
- package/src/components/titleAndStatusLabel/titleAndStatusLabel.d.ts +0 -1
- package/src/components/visualTextIcon/visualTextIcon.d.ts +0 -1
- package/src/elements/index.d.ts +1 -1
- package/src/elements/tagIcon/Chip.d.ts +2 -1
- package/src/elements/tagIcon/Chips.d.ts +0 -1
- package/src/elements/tagIcon/TagIconWithChips.d.ts +0 -1
- package/src/hooks/useIsMobile.d.ts +1 -2
- package/src/icons/echoAssets/index.d.ts +3 -1
- package/src/icons/echoAssets/legendMarker.d.ts +2 -0
- package/src/icons/echoAssets/legendMarkerChip.d.ts +2 -0
- package/src/icons/echoAssets/xld.d.ts +1 -0
- package/src/theme/themeConst.d.ts +8 -0
- package/src/types/draggableItem.d.ts +0 -1
- package/src/types/menuItem.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-components",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.11",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"chart.js": "4.4.3",
|
|
6
|
+
"react-datepicker": "4.25.0",
|
|
6
7
|
"react-window": "1.8.10",
|
|
7
|
-
"
|
|
8
|
+
"uuid": "^9.0.1"
|
|
8
9
|
},
|
|
9
10
|
"peerDependencies": {
|
|
10
11
|
"@equinor/echo-utils": ">= 0.4.0 < 0.5.0",
|
|
11
12
|
"@equinor/eds-core-react": "0.34.0",
|
|
12
13
|
"@equinor/eds-icons": "0.19.3",
|
|
14
|
+
"classnames": "2.5.1",
|
|
15
|
+
"lodash": ">= 4.17.21 < 5",
|
|
13
16
|
"react": ">= 17.0.2",
|
|
14
17
|
"react-dom": ">= 17.0.2",
|
|
15
|
-
"zustand": ">= 4.4.7 < 5",
|
|
16
|
-
"lodash": ">= 4.17.21 < 5",
|
|
17
18
|
"react-sortablejs": "6.1.4",
|
|
18
19
|
"sortablejs": ">= 1.15.1 < 2",
|
|
19
|
-
"
|
|
20
|
+
"zustand": ">= 4.4.7 < 5"
|
|
20
21
|
},
|
|
21
22
|
"main": "./index.cjs.js",
|
|
22
23
|
"type": "commonjs"
|
|
@@ -12,5 +12,9 @@ type AutohiddenContentProps = {
|
|
|
12
12
|
/** The content to autohide. */
|
|
13
13
|
children: ReactElement<HTMLElement | string | number>;
|
|
14
14
|
};
|
|
15
|
+
/** A component that autohides its children content after a specified delay.
|
|
16
|
+
* <p>The implementer may choose between removing the content from the DOM; which will probably shift the layout, or
|
|
17
|
+
* they can turn the content invisible with CSS.</p>
|
|
18
|
+
*/
|
|
15
19
|
export declare function AutohiddenContent({ delay, hideMethod, onHide, children }: AutohiddenContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
20
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TooltipProps } from '@equinor/eds-core-react';
|
|
2
|
-
type LinkProps = Omit<TooltipProps, 'href' | 'children'> & {
|
|
2
|
+
export type LinkProps = Omit<TooltipProps, 'href' | 'children'> & {
|
|
3
|
+
/** To override styles. */
|
|
3
4
|
className?: string;
|
|
4
5
|
/** The external link. */
|
|
5
6
|
href: string;
|
|
@@ -7,9 +8,14 @@ type LinkProps = Omit<TooltipProps, 'href' | 'children'> & {
|
|
|
7
8
|
linkText: string;
|
|
8
9
|
/** If true, the link is opened in the same window or tab. */
|
|
9
10
|
preserveTab?: boolean;
|
|
10
|
-
/** The text to be displayed in the tooltip.
|
|
11
|
+
/** The text to be displayed in the tooltip. The tooltip is not rendered on touch devices.*/
|
|
11
12
|
tooltipText?: string;
|
|
13
|
+
/** An optional callback when the link is clicked. */
|
|
12
14
|
onClick?: () => void;
|
|
13
15
|
};
|
|
16
|
+
/** A semantic link component that features link text and icon.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <BlackLink href="https://example.com" linkText="Link to somewhere" tooltipText="This links somewhere" />
|
|
20
|
+
*/
|
|
14
21
|
export declare const BlackLink: ({ className, href, linkText, preserveTab, tooltipText, onClick, enterDelay, placement, ...toolTipRest }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface CopyToClipboardProps {
|
|
3
|
+
/** The text to be copied. */
|
|
3
4
|
copyableText: string;
|
|
5
|
+
/** The EDS standard variant which alters the colours. Defaults to neutral. */
|
|
4
6
|
variant?: 'neutral' | 'warning' | 'error' | 'success';
|
|
7
|
+
/** If the copyable text is very long, this can be optionally set. */
|
|
5
8
|
multiline?: boolean;
|
|
9
|
+
/** To override styles. */
|
|
6
10
|
className?: string;
|
|
7
11
|
}
|
|
12
|
+
/** A component that simplifies the copying of text.
|
|
13
|
+
* <p>The user can select the text inside the input element to have it highlighted, or
|
|
14
|
+
* they can click the copy button to copy the text.</p>
|
|
15
|
+
* <p>The component uses Clipboard API, but is not concerned with permissions.</p>
|
|
16
|
+
* */
|
|
8
17
|
declare const CopyToClipboard: ({ copyableText, className, multiline, variant }: CopyToClipboardProps) => React.JSX.Element;
|
|
9
18
|
export { CopyToClipboard };
|
|
@@ -1,15 +1,30 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TabListProps, TabPanelsProps, TabsProps } from '@equinor/eds-core-react';
|
|
3
|
-
/**
|
|
2
|
+
/** Allows markup to be horizontally sectioned in tabs. <br />
|
|
3
|
+
* The component is a drop in replacement for the regular EDS tabs.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const { HorizontalTabs, Tab, TabPanels, Tabs, TabPanel } = HorizontalTabView;
|
|
7
|
+
*
|
|
8
|
+
* <HorizontalTabs onChange={setActiveTab} activeTab={activeTab}>
|
|
9
|
+
<Tabs>
|
|
10
|
+
<Tab>Tab 1</Tab>
|
|
11
|
+
<Tab>Tab 2</Tab>
|
|
12
|
+
</Tabs>
|
|
13
|
+
<TabPanels>
|
|
14
|
+
<TabPanel>Tab Content 1</TabPanel>
|
|
15
|
+
<TabPanel>Tab Content 2</TabPanel>
|
|
16
|
+
</TabPanels>
|
|
17
|
+
</HorizontalTabs>
|
|
18
|
+
*/
|
|
4
19
|
export declare function TabView(props: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
5
20
|
/** Returns the parent element of the tabs themselves. */
|
|
6
21
|
export declare function Tabs(props: TabListProps): import("react/jsx-runtime").JSX.Element;
|
|
7
22
|
/** Returns a button that acts like a tab button in a tab list. */
|
|
8
23
|
export declare const Tab: import("react").ForwardRefExoticComponent<{
|
|
9
|
-
active?: boolean
|
|
10
|
-
value?:
|
|
11
|
-
disabled?: boolean
|
|
12
|
-
as?: import("react").ElementType
|
|
24
|
+
active?: boolean;
|
|
25
|
+
value?: number | string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
as?: import("react").ElementType;
|
|
13
28
|
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<unknown>>;
|
|
14
29
|
/** Returns the parent of the tab-sectioned content. */
|
|
15
30
|
export declare function TabPanels(props: TabPanelsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Tab, TabPanels, TabView, Tabs } from './HorizontalTabView';
|
|
3
2
|
declare const EDSPanel: import("react").ForwardRefExoticComponent<import("@equinor/eds-core-react").TabPanelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
3
|
interface HorizontalTabsProps {
|
|
@@ -19,7 +19,16 @@ export * from './functionalLocationListItem/FunctionalLocationListItem';
|
|
|
19
19
|
export * from './horizontalTabView';
|
|
20
20
|
export * from './iconLink/compactIconLink/CompactIconLink';
|
|
21
21
|
export * from './iconLink/inlineTagIconLink/InlineTagIconLink';
|
|
22
|
+
export * from './itemMarker/ItemMarker';
|
|
23
|
+
export * from './itemMarker/ItemMarkerExpanded';
|
|
24
|
+
export * from './itemMarker/ItemMarkerIcon';
|
|
25
|
+
export * from './itemMarker/MultipleItemMarkers';
|
|
26
|
+
export * from './itemMarkerAndPopoverWrapper/itemMarkerAndPopoverWrapper';
|
|
27
|
+
export * from './itemMarkerPopover/itemMarkerPopover';
|
|
22
28
|
export * from './legend';
|
|
29
|
+
export * from './legendChip/legendChip';
|
|
30
|
+
export * from './legendSelector/legendSelector';
|
|
31
|
+
export * from './legendSelectorMenu/legendSelectorMenu';
|
|
23
32
|
export * from './linkIcon/LinkIcon';
|
|
24
33
|
export * from './listItem';
|
|
25
34
|
export * from './listRow/ListRow';
|
|
@@ -28,6 +37,7 @@ export * from './multilineTabs/MultilineTabs';
|
|
|
28
37
|
export * from './notificationListItem/NotificationListItem';
|
|
29
38
|
export * from './pcMatrix/PCMatrix';
|
|
30
39
|
export * from './rightPanel';
|
|
40
|
+
export * from './scrollableTabs/ScrollableTabs';
|
|
31
41
|
export * from './searchBar';
|
|
32
42
|
export * from './secondaryMarker/SecondaryMarker';
|
|
33
43
|
export * from './secondaryMarker/SecondaryMarkerExpander';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { ChipProps } from '../../elements/tagIcon/Chip';
|
|
3
|
+
export interface ChipsContainerProps {
|
|
4
|
+
chips: ChipProps[];
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
isTransparent?: boolean;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare const ChipsContainer: React.FC<ChipsContainerProps>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { ChipProps } from '../../elements';
|
|
3
|
+
import { IconSize, ItemMarkerIconType, ItemMarkerPosition, ItemMarkerSize } from './utils/itemMarkerUtils';
|
|
4
|
+
export interface ItemMarkerProps {
|
|
5
|
+
icon: ItemMarkerIconType;
|
|
6
|
+
size?: ItemMarkerSize;
|
|
7
|
+
isTransparent?: boolean;
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
isChipsEnabled?: boolean;
|
|
10
|
+
chips?: ChipProps[];
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
iconColor?: string;
|
|
13
|
+
iconSize?: IconSize;
|
|
14
|
+
hasPointer?: boolean;
|
|
15
|
+
pointerPosition?: ItemMarkerPosition;
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
onClick?: () => void;
|
|
18
|
+
onMouseEnter?: () => void;
|
|
19
|
+
onMouseLeave?: () => void;
|
|
20
|
+
maxNumberOfChips?: number;
|
|
21
|
+
zIndex?: number | string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders an item marker with optional chips.
|
|
25
|
+
*
|
|
26
|
+
* @param {ItemMarkerIconType} icon - Icon to use.
|
|
27
|
+
* @param {ItemMarkerSize} size - Size of the item marker (optional).
|
|
28
|
+
* @param {boolean} isTransparent - If true, marker is visible; if false, transparent (optional).
|
|
29
|
+
* @param {boolean} isActive - Indicates active state (optional).
|
|
30
|
+
* @param {boolean} isChipsEnabled - Shows chips if true (optional).
|
|
31
|
+
* @param {ChipProps[]} chips - Chips to display (optional).
|
|
32
|
+
* @param {string} backgroundColor - The itemMarker's background color (optional).
|
|
33
|
+
* @param {string} iconColor - Background color of the icon (optional).
|
|
34
|
+
* @param {IconSize} iconSize - Size of the icon (optional).
|
|
35
|
+
* @param {boolean} hasPointer - If true, marker includes a pointer (optional).
|
|
36
|
+
* @param {ItemMarkerPosition} pointerPosition - ItemMarker's pointer position (optional).
|
|
37
|
+
* @param {CSSProperties} style - Custom styles for itemMarker and chips (optional).
|
|
38
|
+
* @param {() => void} onClick - Click handler for the itemMarker (optional).
|
|
39
|
+
* @param {() => void} onMouseEnter - Mouse enter handler for the itemMarker (optional).
|
|
40
|
+
* @param {() => void} onMouseLeave - Mouse leave handler for the itemMarker (optional).
|
|
41
|
+
* @param {number} maxNumberOfChips - Maximum chips displayed (optional).
|
|
42
|
+
* @param {number | string} [zIndex] - z-index of the marker and chips (optional).
|
|
43
|
+
*
|
|
44
|
+
* @returns {JSX.Element} Component
|
|
45
|
+
*/
|
|
46
|
+
export declare const ItemMarker: React.FC<ItemMarkerProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { ChipProps } from '../../elements/tagIcon/Chip';
|
|
3
|
+
export interface ItemMarkerChipsProps {
|
|
4
|
+
chips: ChipProps[];
|
|
5
|
+
maxNumberOfChips?: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
isTransparent?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const ItemMarkerChips: React.FC<ItemMarkerChipsProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IconSize, ItemMarkerIconType, ItemMarkerPosition, ItemMarkerSize } from './utils/itemMarkerUtils';
|
|
2
|
+
export type ItemMarkerContentProps = {
|
|
3
|
+
icon: ItemMarkerIconType;
|
|
4
|
+
size?: ItemMarkerSize;
|
|
5
|
+
hasPointer?: boolean;
|
|
6
|
+
pointerPosition?: ItemMarkerPosition;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
iconColor?: string;
|
|
9
|
+
iconSize?: IconSize;
|
|
10
|
+
isActive?: boolean;
|
|
11
|
+
isTransparent?: boolean;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const ItemMarkerContent: ({ icon, size, hasPointer, pointerPosition, backgroundColor, iconColor, iconSize, isActive, isTransparent, onClick }: ItemMarkerContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconSize, ItemMarkerIconType, ItemMarkerSize } from './utils/itemMarkerUtils';
|
|
3
|
+
interface ItemMarkerIconProps {
|
|
4
|
+
icon: ItemMarkerIconType;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
iconColor?: string;
|
|
8
|
+
iconSize?: IconSize;
|
|
9
|
+
size?: ItemMarkerSize;
|
|
10
|
+
}
|
|
11
|
+
export declare const ItemMarkerIcon: React.FC<ItemMarkerIconProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ItemMarkerPosition } from './utils/itemMarkerUtils';
|
|
3
|
+
export interface MultipleItemMarkersProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
isTransparent?: boolean;
|
|
6
|
+
pointerPosition?: ItemMarkerPosition;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Generic component that renders multiple item markers
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* @param {ReactNode} children - Use for adding multiple ItemMarkers.
|
|
14
|
+
* @param {boolean} isTransparent - Boolean that determines whether the marker is transparent. When set to true, the marker is displayed; when false, the marker is made transparent (optional).
|
|
15
|
+
* @param {ItemMarkerPosition} pointerPosition - A value that determines the position of the pointer relative to the marker. This specifies where the pointer should be placed (optional).
|
|
16
|
+
* @param {string} className - Use for styling (optional).
|
|
17
|
+
*
|
|
18
|
+
* @returns {JSX.Element} The rendered component
|
|
19
|
+
*/
|
|
20
|
+
export declare const MultipleItemMarkers: React.FC<MultipleItemMarkersProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IconData } from '@equinor/eds-icons';
|
|
2
|
+
export type ItemMarkerIconType = IconData | JSX.Element | string;
|
|
3
|
+
export type IconSize = 16 | 24;
|
|
4
|
+
export declare enum ItemMarkerSize {
|
|
5
|
+
Small = 28,
|
|
6
|
+
Default = 36,
|
|
7
|
+
Medium = 40,
|
|
8
|
+
Large = 48
|
|
9
|
+
}
|
|
10
|
+
export declare enum ItemMarkerPosition {
|
|
11
|
+
Center = "Center",
|
|
12
|
+
TopRight = "TopRight",
|
|
13
|
+
TopLeft = "TopLeft",
|
|
14
|
+
BottomRight = "BottomRight",
|
|
15
|
+
BottomLeft = "BottomLeft"
|
|
16
|
+
}
|
|
17
|
+
export declare const getPointerPositionClass: (position: ItemMarkerPosition | undefined) => string | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type ItemMarkerAndPopoverWrapperProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
items: JSX.Element[];
|
|
4
|
+
itemMarker: JSX.Element;
|
|
5
|
+
closeOnOutsideClick?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {string} title - Title of the popover.
|
|
10
|
+
* @param {JSX.Element[]} items - List of items to be displayed in the popover.
|
|
11
|
+
* @param {JSX.Element} itemMarker - Item marker component. This can also be the MultipleIconMarkers component.
|
|
12
|
+
* @param {boolean} closeOnOutsideClick - If true, popover will close on outside click (optional).
|
|
13
|
+
* @returns {JSX.Element} Component
|
|
14
|
+
*/
|
|
15
|
+
export declare const ItemMarkerAndPopoverWrapper: ({ title, items, itemMarker, closeOnOutsideClick }: ItemMarkerAndPopoverWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type PaginationProps = {
|
|
2
|
+
itemCount: number;
|
|
3
|
+
currentItemIndex: number;
|
|
4
|
+
setCurrentItemIndex: (index: number) => void;
|
|
5
|
+
darkTheme?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const Pagination: ({ itemCount, currentItemIndex, setCurrentItemIndex, darkTheme }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ItemMarkerPopover = {
|
|
2
|
+
items: JSX.Element[] | string[];
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
handleClose: () => void;
|
|
5
|
+
togglePopover: () => void;
|
|
6
|
+
title: string;
|
|
7
|
+
closeOnOutsideClick?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const ItemMarkerPopover: ({ items, isOpen, handleClose, togglePopover, title, closeOnOutsideClick }: ItemMarkerPopover) => false | import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface LegendChipProps {
|
|
3
|
+
legendStatus: string;
|
|
4
|
+
backgroundColor: string;
|
|
5
|
+
onClick?: (isDisabled: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Legend chip component to display a legend status chip.
|
|
9
|
+
* @param {string} legend - The legend status to be displayed.
|
|
10
|
+
* @param {string} backgroundColor - The background color of the chip.
|
|
11
|
+
* @param {(isDisabled: boolean) => void} onClick - Function to be called when the chip is clicked.
|
|
12
|
+
*/
|
|
13
|
+
export declare const LegendChip: React.FC<LegendChipProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LegendSelectorProps {
|
|
3
|
+
items: string[];
|
|
4
|
+
selectedItem: string;
|
|
5
|
+
setSelectedItem: (selectedItem: string) => void;
|
|
6
|
+
legends: JSX.Element[];
|
|
7
|
+
icon?: JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Legend selector component that will display the selected legend type and the statuses.
|
|
11
|
+
* @param {JSX.Element[]} items - List of items to be displayed in the menu.
|
|
12
|
+
* @param {string} selectedItem - The selected item.
|
|
13
|
+
* @param {(selectedItem: string) => void} setSelectedItem - Function to set the selected item.
|
|
14
|
+
* @param {JSX.Element[]} legends - List of legend chip components to be displayed.
|
|
15
|
+
* @param {JSX.Element} icon - Icon to be displayed before the legend selector. Optional.
|
|
16
|
+
*/
|
|
17
|
+
export declare const LegendSelector: React.FC<LegendSelectorProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface LegendSelectorMenuProps {
|
|
3
|
+
items: string[];
|
|
4
|
+
selectedItem: string;
|
|
5
|
+
setSelectedItem: (selectedItem: string) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Legend selector component to choose which legend type to display.
|
|
9
|
+
* @param {JSX.Element[]} items - List of items to be displayed in the menu.
|
|
10
|
+
* @param {string} selectedItem - The selected item.
|
|
11
|
+
* @param {(selectedItem: string) => void} setSelectedItem - Function to set the selected item.
|
|
12
|
+
*/
|
|
13
|
+
export declare const LegendSelectorMenu: React.FC<LegendSelectorMenuProps>;
|
|
14
|
+
export {};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { TooltipProps } from '@equinor/eds-core-react';
|
|
2
2
|
type LinkIconProps = Omit<TooltipProps, 'children'> & {
|
|
3
|
+
/** Optionally override tooltip styles. */
|
|
3
4
|
tooltipClassName?: string;
|
|
5
|
+
/** Optionally override link styles. */
|
|
4
6
|
className?: string;
|
|
7
|
+
/** The link destination. */
|
|
5
8
|
href: string;
|
|
6
9
|
onClick?: () => void;
|
|
7
10
|
};
|
|
11
|
+
/** A simple link component that only features an icon.
|
|
12
|
+
* <p>Implementers can optionally specify a tooltip to further clarify the destination.
|
|
13
|
+
* <br /> On touch devices, this tooltip is <u>not rendered.</u></p>
|
|
14
|
+
*/
|
|
8
15
|
export declare function LinkIcon({ href, className, tooltipClassName, onClick, ...toolTipProps }: LinkIconProps): import("react/jsx-runtime").JSX.Element;
|
|
9
16
|
export {};
|
|
@@ -44,9 +44,15 @@ interface ListItemBaseProps {
|
|
|
44
44
|
/**
|
|
45
45
|
* Style Modification
|
|
46
46
|
*/
|
|
47
|
-
className?: string;
|
|
48
47
|
style?: CSSProperties;
|
|
48
|
+
className?: string;
|
|
49
|
+
cardClassName?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Intended for displaying optional messages regarding the given list item
|
|
52
|
+
*/
|
|
49
53
|
footer?: React.ReactNode;
|
|
54
|
+
iconColor?: string;
|
|
55
|
+
hideIcon?: boolean;
|
|
50
56
|
}
|
|
51
57
|
export type ListItemProps = ListItemBaseProps & WithVisualOrIconOptions;
|
|
52
58
|
declare function ListItem(props: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -24,5 +24,12 @@ export interface MultilineTabsProps {
|
|
|
24
24
|
* children: The sectioned tab content.
|
|
25
25
|
* }
|
|
26
26
|
* @returns {*} {JSX.Element} Returns a custom EDS Tab bar and sectioned content.
|
|
27
|
+
* @example
|
|
28
|
+
* <MultilineTabs tabs={{title: "Footab"}, {title: "Bartab"}}>
|
|
29
|
+
* <Tabs.Panels>
|
|
30
|
+
* <Tabs.Panel>Foo</Tabs.Panel>
|
|
31
|
+
* <Tabs.Panel>Bar</Tabs.Panel>
|
|
32
|
+
* /Tabs.Panels>
|
|
33
|
+
* </MultilineTabs>
|
|
27
34
|
*/
|
|
28
35
|
export declare const MultilineTabs: (props: MultilineTabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TabsProps } from '@equinor/eds-core-react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
interface ScrollableTabsProps extends TabsProps {
|
|
4
|
+
/** Unique ID for the top level element */
|
|
5
|
+
id: string;
|
|
6
|
+
/** To override styles. */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** The list of tabs to be rendered. */
|
|
9
|
+
tabsListContent: ReactNode[];
|
|
10
|
+
/** The list of tab content. Rendered inside EDSTab.Panel */
|
|
11
|
+
tabsPanelContent: ReactNode[];
|
|
12
|
+
}
|
|
13
|
+
declare function ScrollableTabs({ id, className, tabsListContent, tabsPanelContent, variant }: ScrollableTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { ScrollableTabs };
|
package/src/elements/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export { Icon } from './icon/Icon';
|
|
|
3
3
|
export { RadioButtonGroup } from './radioButtonGroup/RadioButtonGroup';
|
|
4
4
|
export * from './roundIconButton/RoundIconButton';
|
|
5
5
|
export { SliderField } from './sliderField/SliderField';
|
|
6
|
-
export type { ChipProps } from './tagIcon/Chip';
|
|
7
6
|
export { Chip } from './tagIcon/Chip';
|
|
7
|
+
export type { ChipProps } from './tagIcon/Chip';
|
|
8
8
|
export { Chips } from './tagIcon/Chips';
|
|
9
9
|
export { TagIcon } from './tagIcon/TagIcon';
|
|
10
10
|
export { TagIconShadowWrapper } from './tagIcon/TagIconShadow';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export * from './badges';
|
|
2
2
|
export * from './external';
|
|
3
3
|
export * from './general';
|
|
4
|
+
export * from './legendMarker';
|
|
5
|
+
export * from './legendMarkerChip';
|
|
4
6
|
export * from './maps';
|
|
5
7
|
export * from './misc';
|
|
6
8
|
export * from './notifications';
|
|
7
9
|
export * from './punches';
|
|
8
10
|
export * from './sap';
|
|
9
|
-
export * from
|
|
11
|
+
export * from './sidesheet';
|
|
10
12
|
export * from './subsea';
|
|
11
13
|
export * from './workOrders';
|
|
12
14
|
export * from './xld';
|
|
@@ -121,4 +121,12 @@ export declare const themeConst: {
|
|
|
121
121
|
readonly hoverIconWithNotification: string;
|
|
122
122
|
tertiaryText: string;
|
|
123
123
|
secondaryText: string;
|
|
124
|
+
backgroundDark: string;
|
|
125
|
+
backgroundDark2: string;
|
|
126
|
+
backgroundDark3: string;
|
|
127
|
+
hoverDark: string;
|
|
128
|
+
borderDark: string;
|
|
129
|
+
focusDark: string;
|
|
130
|
+
primaryTextForDarkBackground: string;
|
|
131
|
+
secondaryTextForDarkBackground: string;
|
|
124
132
|
};
|
package/src/types/menuItem.d.ts
CHANGED