@equinor/echo-components 0.11.9 → 0.11.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.
- package/index.cjs.js +1 -1
- package/package.json +6 -5
- 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 +4 -5
- 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 +4 -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/markedContent/MarkedContent.d.ts +0 -1
- package/src/components/multilineTabs/MultilineTabs.d.ts +7 -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/xld.d.ts +1 -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.10",
|
|
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"
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TabListProps, TabPanelsProps, TabsProps } from '@equinor/eds-core-react';
|
|
3
2
|
/** The topmost wrapper element for the tab view.*/
|
|
4
3
|
export declare function TabView(props: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,10 +5,10 @@ export declare function TabView(props: TabsProps): import("react/jsx-runtime").J
|
|
|
6
5
|
export declare function Tabs(props: TabListProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
/** Returns a button that acts like a tab button in a tab list. */
|
|
8
7
|
export declare const Tab: import("react").ForwardRefExoticComponent<{
|
|
9
|
-
active?: boolean
|
|
10
|
-
value?:
|
|
11
|
-
disabled?: boolean
|
|
12
|
-
as?: import("react").ElementType
|
|
8
|
+
active?: boolean;
|
|
9
|
+
value?: number | string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
as?: import("react").ElementType;
|
|
13
12
|
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<unknown>>;
|
|
14
13
|
/** Returns the parent of the tab-sectioned content. */
|
|
15
14
|
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,6 +19,10 @@ 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';
|
|
22
26
|
export * from './legend';
|
|
23
27
|
export * from './linkIcon/LinkIcon';
|
|
24
28
|
export * from './listItem';
|
|
@@ -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;
|
|
@@ -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;
|
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';
|
package/src/types/menuItem.d.ts
CHANGED