@equinor/echo-components 4.3.0 → 5.0.0-beta-r19-0
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/{1dd428dbc8752224.svg → 04852fb8014a9692.svg} +19 -19
- package/{246374c510469011.svg → 0a6a2110d0267d69.svg} +142 -142
- package/README.md +278 -278
- package/{8ddc7d44de9795fc.svg → bb2d3aa591e687f9.svg} +112 -112
- package/{c283d1a6c49e1d97.svg → fb72d3eecaa74688.svg} +82 -82
- package/index.cjs.js +1 -1
- package/index.d.ts +1 -1
- package/package.json +4 -4
- package/src/components/accordionWithSwitch/AccordionWithSwitch.d.ts +1 -1
- package/src/components/buttonWithPopover/ButtonWithPopover.d.ts +1 -1
- package/src/components/contextMenu/ContextMenu.d.ts +2 -2
- package/src/components/contextMenuPopover/DataInfoButton.d.ts +1 -1
- package/src/components/contextMenuPopover/DataInfoPopover.d.ts +1 -1
- package/src/components/dialogGenerator/DialogGenerator.d.ts +1 -1
- package/src/components/dropdown/Dropdown.d.ts +1 -1
- package/src/components/echoButton/EchoActionButton.d.ts +3 -1
- package/src/components/echoButton/EchoButton.d.ts +4 -12
- package/src/components/echoButton/EchoToggleButton.d.ts +4 -5
- package/src/components/echoCard/Body.d.ts +1 -1
- package/src/components/echoCard/DateSection.d.ts +1 -1
- package/src/components/echoCard/LinkSection.d.ts +1 -1
- package/src/components/echoCard/Title.d.ts +1 -1
- package/src/components/echoHeader/EchoHeader.d.ts +1 -1
- package/src/components/echoToggleButtonGroup/EchoToggleButtonGroup.d.ts +2 -1
- package/src/components/floatingActionButton/FloatingActionButton.d.ts +1 -1
- package/src/components/horizontalTabView/HorizontalTabView.d.ts +5 -7
- package/src/components/iconLink/compactIconLink/CompactIconLink.d.ts +1 -1
- package/src/components/itemMarker/ItemMarker.d.ts +1 -1
- package/src/components/itemMarker/MultipleItemMarkers.d.ts +1 -1
- package/src/components/itemMarker/utils/itemMarkerUtils.d.ts +1 -1
- package/src/components/itemMarkerPopover/OldItemMarkerPopover.d.ts +2 -2
- package/src/components/legendChip/LegendChip.d.ts +1 -1
- package/src/components/legendSelector/LegendSelector.d.ts +5 -5
- package/src/components/legendSelectorAccordion/LegendSelectorAccordion.d.ts +3 -3
- package/src/components/legendSelectorMenu/LegendSelectorMenu.d.ts +2 -2
- package/src/components/listRow/ListRow.d.ts +1 -1
- package/src/components/markedContent/MarkedContent.d.ts +2 -2
- package/src/components/mediaViewer/MediaViewer.d.ts +1 -1
- package/src/components/multilineTabs/MultilineTabs.d.ts +1 -1
- package/src/components/rightPanel/menuButton/MenuButton.d.ts +8 -3
- package/src/components/rightPanel/panel/Panel.d.ts +1 -1
- package/src/components/rightPanel/panelContent/PanelContent.d.ts +1 -1
- package/src/components/rightPanel/panelContent/PanelContentWrapper.d.ts +1 -1
- package/src/components/rightPanel/panelWrapper/PanelWrapper.d.ts +1 -1
- package/src/components/searchBar/floatingSearchBar/FloatingSearchBar.d.ts +2 -2
- package/src/components/searchBar/responsiveSearchBar/ResponsiveSearchBar.d.ts +1 -1
- package/src/components/sidebarButton/SidebarButton.d.ts +1 -1
- package/src/components/sidesheet/index.d.ts +1 -1
- package/src/components/sidesheet/sheetTopArea/SheetTopArea.d.ts +1 -1
- package/src/components/splitView/SplitView.d.ts +2 -2
- package/src/components/splitView/left/SplitViewLeft.d.ts +1 -1
- package/src/components/tagContextMenu/TagContextMenu.d.ts +1 -1
- package/src/components/titleAndStatusLabel/titleAndStatusLabel.d.ts +1 -1
- package/src/components/visualTextIcon/visualTextIcon.d.ts +1 -1
- package/src/elements/draggableItemsWrapper/DraggableItemsWrapper.d.ts +1 -1
- package/src/elements/icon/Icon.d.ts +1 -1
- package/src/elements/radioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/src/elements/sliderField/SliderField.d.ts +1 -1
- package/src/elements/tagIcon/TagIcon.d.ts +2 -2
- package/src/elements/tagIcon/TagIconShadow.d.ts +1 -1
- package/src/elements/textIconButton/TextIconButton.d.ts +1 -1
- package/src/helpers/tagCategoryIcon.d.ts +2 -2
- package/src/structure/iconList/IconList.d.ts +1 -1
- package/src/structure/linkCard/LinkCard.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./src
|
|
1
|
+
export * from "./src\\index";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-beta-r19-0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"chart.js": "4.5.1",
|
|
6
6
|
"react-datepicker": "9.1.0",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"react-window": "1.8.11"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@equinor/echo-utils": "
|
|
11
|
+
"@equinor/echo-utils": "5.0.0-beta-r19-0",
|
|
12
12
|
"@equinor/eds-core-react": "0.49.0",
|
|
13
13
|
"@equinor/eds-icons": "0.22.0",
|
|
14
14
|
"@equinor/eds-tokens": "2.1.0",
|
|
15
15
|
"classnames": "2.5.1",
|
|
16
16
|
"lodash": ">= 4.17.21 < 5",
|
|
17
|
-
"react": ">=
|
|
18
|
-
"react-dom": ">=
|
|
17
|
+
"react": ">= 19.2.4",
|
|
18
|
+
"react-dom": ">= 19.2.4",
|
|
19
19
|
"react-sortablejs": "6.1.4",
|
|
20
20
|
"sortablejs": ">= 1.15.1 < 2",
|
|
21
21
|
"zustand": ">= 4.4.7 < 5"
|
|
@@ -21,7 +21,7 @@ interface AccordionWithSwitchProps {
|
|
|
21
21
|
/** Optional prop to disable the switch */
|
|
22
22
|
switchDisabled?: boolean;
|
|
23
23
|
/** Optional warning element to be displayed */
|
|
24
|
-
warning?: JSX.Element;
|
|
24
|
+
warning?: React.JSX.Element;
|
|
25
25
|
}
|
|
26
26
|
export declare const AccordionWithSwitch: ({ title, description, handleSwitchClick, children, descriptionHeading, disableAccordionOnSwitchOff, isExpanded, isToggledOn, switchDisabled, switchAriaLabel, warning }: AccordionWithSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export {};
|
|
@@ -15,7 +15,7 @@ export interface ButtonWithPopoverProps {
|
|
|
15
15
|
* Meant to be the return value of the fetchDataToShow method
|
|
16
16
|
* isLoading: flag to show loading state if data fetch takes some time
|
|
17
17
|
* expanded: flag to determine if popover should be expanded or not
|
|
18
|
-
* @return {*} {JSX.Element} Round button with belonging popover to display data information buttons
|
|
18
|
+
* @return {*} {React.JSX.Element} Round button with belonging popover to display data information buttons
|
|
19
19
|
*/
|
|
20
20
|
export declare const ButtonWithPopover: ({ onShowMoreClicked, fetchedData, isLoading, expanded }: ButtonWithPopoverProps) => React.JSX.Element;
|
|
21
21
|
export default ButtonWithPopover;
|
|
@@ -2,7 +2,7 @@ import React, { CSSProperties } from 'react';
|
|
|
2
2
|
import { TagIconChipsProps } from '../../elements/tagIcon/TagIconWithChips';
|
|
3
3
|
export type StatusChipsProps = Omit<TagIconChipsProps, 'icon' | 'legendColor'>;
|
|
4
4
|
interface ContextMenuProps {
|
|
5
|
-
icon: JSX.Element;
|
|
5
|
+
icon: React.JSX.Element;
|
|
6
6
|
legendColor: string;
|
|
7
7
|
expanded: boolean;
|
|
8
8
|
setExpanded: (expanded: boolean) => void;
|
|
@@ -32,7 +32,7 @@ interface ContextMenuProps {
|
|
|
32
32
|
* selectedClassName: styling used to handle multiple tag visible on the page at the same time, class will be added to tagIcon when context menu is not expanded
|
|
33
33
|
* children: Related elements to display, e.g. more information button
|
|
34
34
|
* }
|
|
35
|
-
* @return {*} {JSX.Element} Context menu with relevant children wrapped
|
|
35
|
+
* @return {*} {React.JSX.Element} Context menu with relevant children wrapped
|
|
36
36
|
*/
|
|
37
37
|
export declare const ContextMenu: React.FC<ContextMenuProps>;
|
|
38
38
|
export default ContextMenu;
|
|
@@ -13,7 +13,7 @@ export interface DataInfoButtonProps {
|
|
|
13
13
|
* ariaLabel: The aria label set on the button, if empty the label will be used
|
|
14
14
|
* onTagInfoClicked: The method to be called when button is pressed
|
|
15
15
|
* itemButtonClassName: Used to style button if default styling is not wanted. class name might need higher precedence for overriding existing styling e.g. "div.itemButtonClassName { background-color: blue !important}"
|
|
16
|
-
* @return {*} {JSX.Element} Data information button with or without a badge based on the provided data object
|
|
16
|
+
* @return {*} {React.JSX.Element} Data information button with or without a badge based on the provided data object
|
|
17
17
|
*/
|
|
18
18
|
export declare const DataInfoButton: React.FC<DataInfoButtonProps>;
|
|
19
19
|
export default DataInfoButton;
|
|
@@ -12,6 +12,6 @@ export interface DataInfoPopoverProps {
|
|
|
12
12
|
* The itemType in these objects are used to group them together in the popover
|
|
13
13
|
* isLoading: loading flag that tells if a dot progress should be displayed if data is being fetched
|
|
14
14
|
* }
|
|
15
|
-
* @return {*} {JSX.Element} Popover with data information buttons based on the provided DataInformation objects
|
|
15
|
+
* @return {*} {React.JSX.Element} Popover with data information buttons based on the provided DataInformation objects
|
|
16
16
|
*/
|
|
17
17
|
export declare const DataInfoPopover: React.FC<DataInfoPopoverProps>;
|
|
@@ -23,6 +23,6 @@ export interface DialogGeneratorProps {
|
|
|
23
23
|
* isDismissable: if the modal is closable by clicking aside or by hitting ESC key
|
|
24
24
|
* onClose: callback to be called when the dialog is closed
|
|
25
25
|
* }
|
|
26
|
-
* @return {*} {JSX.Element} Dialog component
|
|
26
|
+
* @return {*} {React.JSX.Element} Dialog component
|
|
27
27
|
*/
|
|
28
28
|
export declare const DialogGenerator: React.FC<DialogGeneratorProps>;
|
|
@@ -33,7 +33,7 @@ interface DropdownItemProps {
|
|
|
33
33
|
* position: Determines if the dropdown position should be relative or absolute.
|
|
34
34
|
* triggerOpen: Callback to trigger when the dropdown is opened.
|
|
35
35
|
* }
|
|
36
|
-
* @return {*} {JSX.Element} The dropdown component.
|
|
36
|
+
* @return {*} {React.JSX.Element} The dropdown component.
|
|
37
37
|
* * @deprecated Use Autocomplete from EDS instead
|
|
38
38
|
*/
|
|
39
39
|
export declare const Dropdown: React.FC<DropdownItemProps>;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { IconProps } from '@equinor/eds-core-react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { EchoButtonProps } from './EchoButton';
|
|
3
4
|
interface EchoActionButtonProps extends EchoButtonProps {
|
|
4
5
|
iconAlign?: 'left' | 'right';
|
|
5
6
|
iconProps: Exclude<IconProps, 'size'>;
|
|
7
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
* Wrapper for EDS button with icon and UI preferences support..
|
|
9
11
|
* It uses EchoButton as a base and adds icon support.
|
|
10
12
|
* NB: IconProps should never be allowed to be undefined, if you don't want to use an icon, use EchoButton instead.
|
|
11
13
|
*/
|
|
12
|
-
export declare const EchoActionButton:
|
|
14
|
+
export declare const EchoActionButton: ({ iconAlign, children, iconProps, className, isLoading, ref, ...restProps }: EchoActionButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { ButtonProps } from '@equinor/eds-core-react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
export type EchoButtonProps = ButtonProps & {
|
|
3
|
-
readonly isLoading?: boolean;
|
|
4
4
|
readonly isSelected?: boolean;
|
|
5
|
+
readonly isLoading?: boolean;
|
|
6
|
+
readonly ref?: React.Ref<HTMLButtonElement>;
|
|
5
7
|
};
|
|
6
8
|
/**
|
|
7
9
|
* Wrapper for EDS Button with UI preferences support, and dark mode support (uses new light/dark CSS variables).
|
|
8
10
|
* This button component should be removed when EDS 1.0 is fully adopted, then we would use the button component from there.
|
|
9
11
|
* For now we need this to be able to implement temporary styles with dark support.
|
|
10
12
|
*/
|
|
11
|
-
export declare const EchoButton: import("react").
|
|
12
|
-
color?: "primary" | "secondary" | "danger";
|
|
13
|
-
variant?: "ghost" | "contained" | "contained_icon" | "outlined" | "ghost_icon";
|
|
14
|
-
href?: string;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
type?: string;
|
|
17
|
-
fullWidth?: boolean;
|
|
18
|
-
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
19
|
-
readonly isLoading?: boolean;
|
|
20
|
-
readonly isSelected?: boolean;
|
|
21
|
-
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
export declare const EchoButton: (props: EchoButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { EchoButtonProps } from './EchoButton';
|
|
2
3
|
export type EchoToggleButtonProps = Omit<EchoButtonProps, 'variant' | 'color'> & {
|
|
3
4
|
isSelected?: boolean;
|
|
@@ -15,8 +16,6 @@ export type EchoToggleButtonProps = Omit<EchoButtonProps, 'variant' | 'color'> &
|
|
|
15
16
|
* @param {boolean} [props.isSelected] - Indicates if the button is in a selected state.
|
|
16
17
|
* @param {'contained' | 'contained_icon' | 'outlined'} [props.variant] - Button variant. Ghost variants are not available for toggle buttons.
|
|
17
18
|
*/
|
|
18
|
-
export declare const EchoToggleButton:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
color?: Exclude<EchoButtonProps["color"], "danger">;
|
|
22
|
-
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
export declare const EchoToggleButton: ({ children, className, isSelected, variant, ref, ...restProps }: EchoToggleButtonProps & {
|
|
20
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
21
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,4 +4,4 @@ export type BodyProps = {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
bodyText?: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const Body: ({ bodyText, children, className }: Partial<BodyProps>) => JSX.Element;
|
|
7
|
+
export declare const Body: ({ bodyText, children, className }: Partial<BodyProps>) => React.JSX.Element;
|
|
@@ -5,4 +5,4 @@ export type DateSectionProps = {
|
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
className?: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const DateSection: ({ dateSectionText, date, children, className }: Partial<DateSectionProps>) => JSX.Element;
|
|
8
|
+
export declare const DateSection: ({ dateSectionText, date, children, className }: Partial<DateSectionProps>) => React.JSX.Element;
|
|
@@ -5,4 +5,4 @@ export type LinkSectionProps = {
|
|
|
5
5
|
linkSectionIcons?: CardIcons[];
|
|
6
6
|
className?: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const LinkSection: ({ children, className, linkSectionIcons }: Partial<LinkSectionProps>) => JSX.Element;
|
|
8
|
+
export declare const LinkSection: ({ children, className, linkSectionIcons }: Partial<LinkSectionProps>) => React.JSX.Element;
|
|
@@ -9,4 +9,4 @@ export type TitleProps = {
|
|
|
9
9
|
headerIcons?: CardIcons[];
|
|
10
10
|
className?: string;
|
|
11
11
|
};
|
|
12
|
-
export declare const Title: ({ headerTitle, headerIcons, className, onHeaderClick }: Partial<TitleProps>) => JSX.Element;
|
|
12
|
+
export declare const Title: ({ headerTitle, headerIcons, className, onHeaderClick }: Partial<TitleProps>) => React.JSX.Element;
|
|
@@ -14,6 +14,6 @@ export interface EchoHeaderProps {
|
|
|
14
14
|
* plantName: show the plant name next to the module title
|
|
15
15
|
* customSection: a section in the header where there can be custom components
|
|
16
16
|
* }
|
|
17
|
-
* @returns {*} {JSX.Element} Echo header with custom section
|
|
17
|
+
* @returns {*} {React.JSX.Element} Echo header with custom section
|
|
18
18
|
*/
|
|
19
19
|
export declare const EchoHeader: ({ moduleTitle, moduleIcon, plantName, customHeaderSection }: EchoHeaderProps) => React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type EchoToggleButtonProps } from '../echoButton/EchoToggleButton';
|
|
2
3
|
export interface EchoToggleButtonGroupOption<T> {
|
|
3
|
-
readonly label: string | JSX.Element;
|
|
4
|
+
readonly label: string | React.JSX.Element;
|
|
4
5
|
readonly value: T;
|
|
5
6
|
}
|
|
6
7
|
interface EchoToggleButtonGroupProps<T> {
|
|
@@ -26,7 +26,7 @@ export type FloatingActionButtonProps = MutuallyExclusiveVariantLabel & {
|
|
|
26
26
|
/**
|
|
27
27
|
* Floating actions buttons exists within the viewport, seperated from any sheet, dialog or menu
|
|
28
28
|
* and are typically used for special actions pertaining to the module they are used in.
|
|
29
|
-
* @return {*} {JSX.Element} Floating actions button
|
|
29
|
+
* @return {*} {React.JSX.Element} Floating actions button
|
|
30
30
|
*/
|
|
31
31
|
export declare const FloatingActionButton: ({ label, iconName, ariaLabel, variant, disabled, active, onClick }: FloatingActionButtonProps) => React.JSX.Element;
|
|
32
32
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { TabListProps, TabPanelsProps, TabsProps } from '@equinor/eds-core-react';
|
|
1
|
+
import { TabListProps, TabPanelsProps, TabProps, TabsProps } from '@equinor/eds-core-react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
/** Allows markup to be horizontally sectioned in tabs. <br />
|
|
3
4
|
* The component is a drop in replacement for the regular EDS tabs.
|
|
4
5
|
*
|
|
@@ -20,11 +21,8 @@ export declare function TabView(props: TabsProps): import("react/jsx-runtime").J
|
|
|
20
21
|
/** Returns the parent element of the tabs themselves. */
|
|
21
22
|
export declare function Tabs(props: TabListProps): import("react/jsx-runtime").JSX.Element;
|
|
22
23
|
/** Returns a button that acts like a tab button in a tab list. */
|
|
23
|
-
export declare const Tab:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
as?: import("react").ElementType;
|
|
28
|
-
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<unknown>>;
|
|
24
|
+
export declare const Tab: ({ ref, active, disabled, children, className, ...otherProps }: TabProps & {
|
|
25
|
+
ref?: React.Ref<HTMLElement>;
|
|
26
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
29
27
|
/** Returns the parent of the tab-sectioned content. */
|
|
30
28
|
export declare function TabPanels(props: TabPanelsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,4 +6,4 @@ export interface CompactIconLinkProps {
|
|
|
6
6
|
icon?: string | React.ReactNode;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare const CompactIconLink: ({ title, meta, legendColor, onClickHandler, icon, className }: CompactIconLinkProps) => JSX.Element;
|
|
9
|
+
export declare const CompactIconLink: ({ title, meta, legendColor, onClickHandler, icon, className }: CompactIconLinkProps) => React.JSX.Element;
|
|
@@ -42,6 +42,6 @@ export interface ItemMarkerProps {
|
|
|
42
42
|
* @param {number | string} [zIndex] - z-index of the marker and chips (optional).
|
|
43
43
|
* @param {string} highlightColor - Highlight color for the marker (optional).
|
|
44
44
|
*
|
|
45
|
-
* @returns {JSX.Element} Component
|
|
45
|
+
* @returns {React.JSX.Element} Component
|
|
46
46
|
*/
|
|
47
47
|
export declare const ItemMarker: React.FC<ItemMarkerProps>;
|
|
@@ -22,6 +22,6 @@ export interface MultipleItemMarkersProps {
|
|
|
22
22
|
* @param {() => void} onClick - Click handler for the itemMarker (optional).
|
|
23
23
|
* @param {boolean} enablePointerAnchor - Anchors the pointer (arrow) to the top-left corner of the parent container (optional).
|
|
24
24
|
*
|
|
25
|
-
* @returns {JSX.Element} The rendered component
|
|
25
|
+
* @returns {React.JSX.Element} The rendered component
|
|
26
26
|
*/
|
|
27
27
|
export declare const MultipleItemMarkers: React.FC<MultipleItemMarkersProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconData } from '@equinor/eds-icons';
|
|
2
|
-
export type ItemMarkerIconType = IconData | JSX.Element | string;
|
|
2
|
+
export type ItemMarkerIconType = IconData | React.JSX.Element | string;
|
|
3
3
|
export type IconSize = 16 | 24;
|
|
4
4
|
export declare enum ItemMarkerSize {
|
|
5
5
|
Small = 28,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
export type OldItemMarkerPopover = {
|
|
3
|
-
items: ReadonlyArray<JSX.Element> | ReadonlyArray<string>;
|
|
3
|
+
items: ReadonlyArray<React.JSX.Element> | ReadonlyArray<string>;
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
handleClose: () => void;
|
|
6
6
|
title: string;
|
|
@@ -18,7 +18,7 @@ export type OldItemMarkerPopover = {
|
|
|
18
18
|
* When using ListItem for the content, using the css parameter -webkit-text-fill-color is recommended for overriding the text color.
|
|
19
19
|
* To override the hover effect for ListItem, override the elements in the ListItem like this: > li:hover
|
|
20
20
|
* This component will always render in dark mode.
|
|
21
|
-
* @param {JSX.Element[] | string[]} items - List of items to be displayed in the popover.
|
|
21
|
+
* @param {React.JSX.Element[] | string[]} items - List of items to be displayed in the popover.
|
|
22
22
|
* @param {boolean} isOpen - If true, popover is open.
|
|
23
23
|
* @param {() => void} handleClose - Function to close the popover (this is used to handle closing only, not toggling it).
|
|
24
24
|
* @param {string} title - Title of the popover.
|
|
@@ -13,6 +13,6 @@ export interface LegendChipProps {
|
|
|
13
13
|
* @param {string} backgroundColor - The background color of the chip.
|
|
14
14
|
* @param {boolean} disabled - Boolean to disable the chip. Optional.
|
|
15
15
|
* @param {(isDisabled: boolean) => void} onClick - Function to be called when the chip is clicked.
|
|
16
|
-
* @returns {JSX.Element} - Legend chip component.
|
|
16
|
+
* @returns {React.JSX.Element} - Legend chip component.
|
|
17
17
|
*/
|
|
18
18
|
export declare const LegendChip: React.FC<LegendChipProps>;
|
|
@@ -6,20 +6,20 @@ export interface LegendSelectorProps {
|
|
|
6
6
|
onOptionClick: (option: string) => void;
|
|
7
7
|
legends: ReadonlyArray<LegendChipProps>;
|
|
8
8
|
showLegendToggle?: boolean;
|
|
9
|
-
visual?: JSX.Element;
|
|
9
|
+
visual?: React.JSX.Element;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Legend selector component that will display the selected legend type and the statuses.
|
|
14
14
|
* Note that this component is meant to be displayed on a darker background, and should be used with the LegendSelectorAccordion as display in the LegendSelector story in the storybook.
|
|
15
15
|
* Will always render dark.
|
|
16
|
-
* @param {JSX.Element[]} options - List of options to be displayed in the selection-selector.
|
|
16
|
+
* @param {React.JSX.Element[]} options - List of options to be displayed in the selection-selector.
|
|
17
17
|
* @param {string} selectedOption - The selected option.
|
|
18
18
|
* @param {(option: string) => void} onOptionsClick - Function that is called when another option is clicked.
|
|
19
|
-
* @param {JSX.Element[]} legends - List of legend chip components to be displayed.
|
|
19
|
+
* @param {React.JSX.Element[]} legends - List of legend chip components to be displayed.
|
|
20
20
|
* @param {boolean} showLegendToggle - Boolean to show the legend toggle button. Optional.
|
|
21
|
-
* @param {JSX.Element} visual - Visual or icon to be displayed before the legend selector. Optional.
|
|
21
|
+
* @param {React.JSX.Element} visual - Visual or icon to be displayed before the legend selector. Optional.
|
|
22
22
|
* @param {string} placeholder - Placeholder text to be displayed when no selection is selected. Optional.
|
|
23
|
-
* @returns {JSX.Element} - Legend selector component.
|
|
23
|
+
* @returns {React.JSX.Element} - Legend selector component.
|
|
24
24
|
*/
|
|
25
25
|
export declare const LegendSelector: React.FC<LegendSelectorProps>;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
interface LegendSelectorAccordionBaseProps {
|
|
3
3
|
title: string;
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
visual?: JSX.Element;
|
|
5
|
+
visual?: React.JSX.Element;
|
|
6
6
|
caption?: string;
|
|
7
7
|
actions?: React.ReactNode;
|
|
8
8
|
}
|
|
@@ -26,13 +26,13 @@ export type LegendSelectorAccordionProps = UncontrolledProps | ControlledProps;
|
|
|
26
26
|
*
|
|
27
27
|
* @param {string} title - The title of the accordion/type of legend.
|
|
28
28
|
* @param {React.ReactNode} children - The children to be displayed in the accordion.
|
|
29
|
-
* @param {JSX.Element} visual - The visual or icon to be displayed in the accordion header. Optional.
|
|
29
|
+
* @param {React.JSX.Element} visual - The visual or icon to be displayed in the accordion header. Optional.
|
|
30
30
|
* @param {string} caption - The caption to be displayed in the accordion header. Optional.
|
|
31
31
|
* @param {React.ReactNode} actions - The actions to be displayed in the accordion header. Optional.
|
|
32
32
|
* @param {boolean} isExpanded - Controlled: whether the accordion is expanded.
|
|
33
33
|
* @param {function} setIsExpanded - Controlled: callback when expanded state changes.
|
|
34
34
|
* @param {boolean} defaultIsExpanded - Uncontrolled: default expanded state (default: false).
|
|
35
|
-
* @returns {JSX.Element} - Legend selector accordion component.
|
|
35
|
+
* @returns {React.JSX.Element} - Legend selector accordion component.
|
|
36
36
|
*/
|
|
37
37
|
export declare const LegendSelectorAccordion: React.FC<LegendSelectorAccordionProps>;
|
|
38
38
|
export {};
|
|
@@ -8,11 +8,11 @@ interface LegendSelectorMenuProps {
|
|
|
8
8
|
/**
|
|
9
9
|
* Legend selector component to choose which legend type to display.
|
|
10
10
|
* This component is part of the LegendSelector, but can be used on it's own when needed.
|
|
11
|
-
* @param {JSX.Element[]} options- List of items to be displayed in the menu.
|
|
11
|
+
* @param {React.JSX.Element[]} options- List of items to be displayed in the menu.
|
|
12
12
|
* @param {string} selectedOption- The selected item.
|
|
13
13
|
* @param {(option: string) => void} onOptionClick - Function that is called when another option is clicked.
|
|
14
14
|
* @param {string} placeholder - Placeholder text to be displayed when no item is selected. Optional.
|
|
15
|
-
* @returns {JSX.Element} - Legend selector menu component.
|
|
15
|
+
* @returns {React.JSX.Element} - Legend selector menu component.
|
|
16
16
|
*/
|
|
17
17
|
export declare const LegendSelectorMenu: React.FC<LegendSelectorMenuProps>;
|
|
18
18
|
export {};
|
|
@@ -24,6 +24,6 @@ export interface ListRowProps {
|
|
|
24
24
|
* }
|
|
25
25
|
* style: style element to override wrapper style
|
|
26
26
|
* }
|
|
27
|
-
* @return {*} {JSX.Element} a row element to be used in a list
|
|
27
|
+
* @return {*} {React.JSX.Element} a row element to be used in a list
|
|
28
28
|
*/
|
|
29
29
|
export declare const ListRow: React.FC<ListRowProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
interface MarkedContentProps {
|
|
2
2
|
backgroundColor: string;
|
|
3
3
|
textColor: string;
|
|
4
|
-
children: JSX.Element | string[] | string | number;
|
|
4
|
+
children: React.JSX.Element | string[] | string | number;
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function MarkedContent({ backgroundColor, textColor, children, className }: Readonly<MarkedContentProps>): JSX.Element;
|
|
7
|
+
export declare function MarkedContent({ backgroundColor, textColor, children, className }: Readonly<MarkedContentProps>): React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -31,7 +31,7 @@ export interface MultilineTabsProps {
|
|
|
31
31
|
* initiallyExpanded: The tab panel is expanded on mount.
|
|
32
32
|
* children: The sectioned tab content.
|
|
33
33
|
* }
|
|
34
|
-
* @returns {*} {JSX.Element} Returns a custom EDS Tab bar and sectioned content.
|
|
34
|
+
* @returns {*} {React.JSX.Element} Returns a custom EDS Tab bar and sectioned content.
|
|
35
35
|
* @example
|
|
36
36
|
* <MultilineTabs tabs={{title: "Footab"}, {title: "Bartab"}}>
|
|
37
37
|
* <Tabs.Panels>
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
2
|
interface MenuButtonInterfaceProps {
|
|
3
3
|
text: string;
|
|
4
4
|
active: boolean;
|
|
5
5
|
onClick: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
id?: string;
|
|
8
|
+
ref?: React.Ref<HTMLButtonElement | null>;
|
|
8
9
|
}
|
|
10
|
+
type MenuButtonProps = MenuButtonInterfaceProps & HTMLAttributes<HTMLButtonElement>;
|
|
9
11
|
/**
|
|
10
12
|
* The menu bottom items
|
|
11
13
|
* On desktop it will have an active border on the left,
|
|
@@ -18,7 +20,10 @@ interface MenuButtonInterfaceProps {
|
|
|
18
20
|
* onClick, the on click event
|
|
19
21
|
* id: the id of the button in case its needed
|
|
20
22
|
* }
|
|
21
|
-
* @return {*} {JSX.Element}
|
|
23
|
+
* @return {*} {React.JSX.Element}
|
|
22
24
|
*/
|
|
23
|
-
export declare const MenuButton:
|
|
25
|
+
export declare const MenuButton: {
|
|
26
|
+
({ text, active, children, onClick, id, ref, ...otherProps }: MenuButtonProps): React.JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
24
29
|
export default MenuButton;
|
|
@@ -19,7 +19,7 @@ interface PanelProps {
|
|
|
19
19
|
* header, the header that will be displayed on mobile.
|
|
20
20
|
* If its a string then it will only display a header text. But it can also be a component with self defined html
|
|
21
21
|
* }
|
|
22
|
-
* @return {*} {JSX.Element}
|
|
22
|
+
* @return {*} {React.JSX.Element}
|
|
23
23
|
*/
|
|
24
24
|
export declare const Panel: React.FC<PanelProps>;
|
|
25
25
|
export {};
|
|
@@ -17,7 +17,7 @@ interface PanelContentProps {
|
|
|
17
17
|
* to be used in cases where there are panels within panels,
|
|
18
18
|
* footer: optional param, if used a footer will be shown in the panel content
|
|
19
19
|
* }
|
|
20
|
-
* @return {*} {JSX.Element}
|
|
20
|
+
* @return {*} {React.JSX.Element}
|
|
21
21
|
*/
|
|
22
22
|
export declare const PanelContent: React.FC<PanelContentProps>;
|
|
23
23
|
export default PanelContent;
|
|
@@ -10,7 +10,7 @@ interface PanelContentWrapperProps {
|
|
|
10
10
|
* @param {PanelContentWrapperProps} {
|
|
11
11
|
* children, the panels content
|
|
12
12
|
* }
|
|
13
|
-
* @return {*} {JSX.Element}
|
|
13
|
+
* @return {*} {React.JSX.Element}
|
|
14
14
|
*/
|
|
15
15
|
export declare const PanelContentWrapper: React.FC<PanelContentWrapperProps>;
|
|
16
16
|
export default PanelContentWrapper;
|
|
@@ -15,7 +15,7 @@ interface PanelWrapperProps {
|
|
|
15
15
|
* header, the header that will be displayed on mobile.
|
|
16
16
|
* If its a string then it will only display a header text. But it can also be a component with self defined html
|
|
17
17
|
* }
|
|
18
|
-
* @return {*} {JSX.Element}
|
|
18
|
+
* @return {*} {React.JSX.Element}
|
|
19
19
|
*/
|
|
20
20
|
export declare const PanelWrapper: React.FC<PanelWrapperProps>;
|
|
21
21
|
export {};
|
|
@@ -23,7 +23,7 @@ export interface FloatingSearchBarProps {
|
|
|
23
23
|
*
|
|
24
24
|
* @param {FloatingSearchBarProps} {
|
|
25
25
|
* }
|
|
26
|
-
* @return {*} {JSX.Element}
|
|
26
|
+
* @return {*} {React.JSX.Element}
|
|
27
27
|
*/
|
|
28
|
-
declare const FloatingSearchBar: ({ ariaLabel, placeholder, onSearchQueryChange, suggestionGroups, onSuggestionClick, isLoading, preOpenSuggestionsGroup, defaultValue }: FloatingSearchBarProps) => JSX.Element;
|
|
28
|
+
declare const FloatingSearchBar: ({ ariaLabel, placeholder, onSearchQueryChange, suggestionGroups, onSuggestionClick, isLoading, preOpenSuggestionsGroup, defaultValue }: FloatingSearchBarProps) => React.JSX.Element;
|
|
29
29
|
export { FloatingSearchBar };
|
|
@@ -24,7 +24,7 @@ export interface Props extends React.HTMLProps<HTMLFormElement> {
|
|
|
24
24
|
*
|
|
25
25
|
* @param {Props} {
|
|
26
26
|
* }
|
|
27
|
-
* @return {*} {JSX.Element}
|
|
27
|
+
* @return {*} {React.JSX.Element}
|
|
28
28
|
*/
|
|
29
29
|
declare const ResponsiveSearchBar: React.FC<Props>;
|
|
30
30
|
export { ResponsiveSearchBar };
|
|
@@ -61,6 +61,6 @@ export interface SidebarButtonProps {
|
|
|
61
61
|
* id: the id of the button, in case it's needed.
|
|
62
62
|
* children: the icon to be displayed.
|
|
63
63
|
* }
|
|
64
|
-
* @return {*} {JSX.Element}
|
|
64
|
+
* @return {*} {React.JSX.Element}
|
|
65
65
|
*/
|
|
66
66
|
export declare const SidebarButton: ({ text, active, onClick, count, buttonPosition, refValue, setRefValue, id, children, showIndicator }: SidebarButtonProps) => React.JSX.Element;
|
|
@@ -6,6 +6,6 @@ interface SideSheetProps extends SheetProps, SheetTopAreaProps {
|
|
|
6
6
|
open: boolean;
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
-
declare function SideSheet({ open, side, orientation, floating, children, className, style, ...topBarProps }: SideSheetProps): JSX.Element | null;
|
|
9
|
+
declare function SideSheet({ open, side, orientation, floating, children, className, style, ...topBarProps }: SideSheetProps): React.JSX.Element | null;
|
|
10
10
|
export { SideSheet, SideSheetOrientation };
|
|
11
11
|
export type { SideSheetProps };
|
|
@@ -11,7 +11,7 @@ interface SheetTopAreaProps extends Partial<SheetOrientationActionsProps> {
|
|
|
11
11
|
/** If omitted, all orientation toggles are rendered. */
|
|
12
12
|
enabledOrientations?: EnabledOrientations;
|
|
13
13
|
}
|
|
14
|
-
declare function SheetTopArea({ orientation, onOrientationChange, closeSheet, previous, enabledOrientations, side }: SheetTopAreaProps): JSX.Element | null;
|
|
14
|
+
declare function SheetTopArea({ orientation, onOrientationChange, closeSheet, previous, enabledOrientations, side }: SheetTopAreaProps): React.JSX.Element | null;
|
|
15
15
|
interface SheetOrientationActionsProps {
|
|
16
16
|
orientation: SideSheetOrientation;
|
|
17
17
|
enabledOrientations: EnabledOrientations;
|
|
@@ -4,11 +4,11 @@ interface BaseProps {
|
|
|
4
4
|
style?: CSSProperties;
|
|
5
5
|
}
|
|
6
6
|
interface SplitViewProps extends BaseProps {
|
|
7
|
-
children: [React.
|
|
7
|
+
children: [React.ReactNode, React.ReactNode | undefined];
|
|
8
8
|
}
|
|
9
9
|
declare function SplitView({ className, style, children }: SplitViewProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
interface RightProps extends BaseProps {
|
|
11
|
-
children: React.
|
|
11
|
+
children: React.ReactNode;
|
|
12
12
|
}
|
|
13
13
|
declare function Right({ className, style, children }: RightProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export { Right, SplitView };
|
|
@@ -24,7 +24,7 @@ interface TagContextMenuProps {
|
|
|
24
24
|
* selectedClassName: styling used to handle multiple tag visible on the page at the same time, class will be added to tagIcon when context menu is not expanded
|
|
25
25
|
* children: Meant to be used to pass TagIcon component to this component
|
|
26
26
|
* }
|
|
27
|
-
* @return {*} {JSX.Element} a tag context menu for the provided properties
|
|
27
|
+
* @return {*} {React.JSX.Element} a tag context menu for the provided properties
|
|
28
28
|
*/
|
|
29
29
|
export declare const TagContextMenu: React.FC<TagContextMenuProps>;
|
|
30
30
|
export default TagContextMenu;
|
|
@@ -11,7 +11,7 @@ interface TitleAndStatusLabelProps {
|
|
|
11
11
|
* statusText: the status text
|
|
12
12
|
* statusColor: sets the color of the status label
|
|
13
13
|
* }
|
|
14
|
-
* @returns {*} {JSX.Element} Returns a title with its status label
|
|
14
|
+
* @returns {*} {React.JSX.Element} Returns a title with its status label
|
|
15
15
|
*/
|
|
16
16
|
export declare const TitleAndStatusLabel: React.FC<TitleAndStatusLabelProps>;
|
|
17
17
|
export {};
|
|
@@ -12,7 +12,7 @@ interface VisualTextIconProps {
|
|
|
12
12
|
* visualText: text that replaces the icon
|
|
13
13
|
* backgroundColor: sets the background color of the element
|
|
14
14
|
* }
|
|
15
|
-
* @returns {*} {JSX.Element} Visual Text Icon that can be used to replace the traditional icon in cards, list items etc.
|
|
15
|
+
* @returns {*} {React.JSX.Element} Visual Text Icon that can be used to replace the traditional icon in cards, list items etc.
|
|
16
16
|
*/
|
|
17
17
|
export declare const VisualTextIcon: React.FC<VisualTextIconProps>;
|
|
18
18
|
export {};
|
|
@@ -13,6 +13,6 @@ export interface DraggableItemsWrapperProps {
|
|
|
13
13
|
* onChange: method that will be called when elements have be reordered inside the wrapper
|
|
14
14
|
* children: list of elements that can be reordered
|
|
15
15
|
* }
|
|
16
|
-
* @return {*} {JSX.Element}
|
|
16
|
+
* @return {*} {React.JSX.Element}
|
|
17
17
|
*/
|
|
18
18
|
export declare const DraggableItemsWrapper: React.FC<DraggableItemsWrapperProps>;
|
|
@@ -15,6 +15,6 @@ export interface IconProps {
|
|
|
15
15
|
* color: The color the icon should have (optional - defaults to CSS-controlled color)
|
|
16
16
|
* size: The wanted size of the icon. Possible values are 16, 24, 32, 40 and 48
|
|
17
17
|
* }
|
|
18
|
-
* @return {*} {JSX.Element} A icon for the provided information
|
|
18
|
+
* @return {*} {React.JSX.Element} A icon for the provided information
|
|
19
19
|
*/
|
|
20
20
|
export declare const Icon: React.FC<IconProps>;
|