@equinor/echo-components 0.5.8-rc2 → 0.5.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/LICENSE +21 -21
- package/README.md +62 -62
- package/dist/components/buttonWithPopover/ButtonWithPopover.d.ts +21 -21
- package/dist/components/contextMenu/ContextMenu.d.ts +35 -35
- package/dist/components/contextMenuPopover/DataInfoButton.d.ts +19 -19
- package/dist/components/contextMenuPopover/DataInfoPopover.d.ts +18 -18
- package/dist/components/datePicker/PopupHeader.d.ts +19 -19
- package/dist/components/datePicker/ReactDatePicker.d.ts +19 -19
- package/dist/components/dialogGenerator/DialogGenerator.d.ts +26 -26
- package/dist/components/dropdown/Dropdown.d.ts +37 -37
- package/dist/components/echoBottomBar/EchoBottomBar.d.ts +7 -7
- package/dist/components/echoCard/Body.d.ts +7 -7
- package/dist/components/echoCard/DateSection.d.ts +8 -8
- package/dist/components/echoCard/EchoCard.d.ts +7 -7
- package/dist/components/echoCard/LinkSection.d.ts +8 -8
- package/dist/components/echoCard/Title.d.ts +13 -13
- package/dist/components/echoCard/index.d.ts +14 -14
- package/dist/components/echoHeader/EchoHeader.d.ts +20 -20
- package/dist/components/floatingActionButton/FloatingActionButton.d.ts +29 -29
- package/dist/components/floatingSearchBar/FloatingSearchBar.d.ts +31 -0
- package/dist/components/index.d.ts +20 -17
- package/dist/components/inlineTagIconLink/InlineTagIconLink.d.ts +12 -12
- package/dist/components/listItem/ListItem.d.ts +50 -50
- package/dist/components/listItem/index.d.ts +1 -1
- package/dist/components/listRow/ListRow.d.ts +29 -29
- package/dist/components/rightPanel/PanelContextWrapper.d.ts +19 -19
- package/dist/components/rightPanel/index.d.ts +5 -5
- package/dist/components/rightPanel/menuButton/MenuButton.d.ts +26 -26
- package/dist/components/rightPanel/panel/Panel.d.ts +18 -18
- package/dist/components/rightPanel/panelContent/PanelContent.d.ts +21 -21
- package/dist/components/rightPanel/panelWrapper/PanelWrapper.d.ts +21 -21
- package/dist/components/rightPanel/usePanelContext.d.ts +8 -8
- package/dist/components/sidebarButton/SidebarButton.d.ts +61 -41
- package/dist/components/sidesheet/enums.d.ts +5 -5
- package/dist/components/sidesheet/index.d.ts +11 -11
- package/dist/components/sidesheet/sheet/Sheet.d.ts +19 -19
- package/dist/components/sidesheet/sheet/index.d.ts +1 -1
- package/dist/components/sidesheet/sheet/utils.d.ts +2 -2
- package/dist/components/sidesheet/sheetTopArea/SheetTopArea.d.ts +16 -16
- package/dist/components/sidesheet/sheetTopArea/index.d.ts +1 -1
- package/dist/components/splitView/SplitView.d.ts +10 -0
- package/dist/components/splitView/index.d.ts +8 -0
- package/dist/components/splitView/left/SplitViewLeft.d.ts +7 -0
- package/dist/components/tagContextMenu/TagContextMenu.d.ts +30 -30
- package/dist/components/timePicker/TimePicker.d.ts +12 -12
- package/dist/elements/draggableItemsWrapper/DraggableItemsWrapper.d.ts +18 -18
- package/dist/elements/icon/Icon.d.ts +20 -20
- package/dist/elements/index.d.ts +8 -8
- package/dist/elements/radioButtonGroup/RadioButtonGroup.d.ts +20 -20
- package/dist/elements/roundIconButton/RoundIconButton.d.ts +13 -13
- package/dist/elements/sliderField/SliderField.d.ts +25 -25
- package/dist/elements/tagIcon/TagIcon.d.ts +16 -16
- package/dist/elements/tagIcon/TagIconShadow.d.ts +13 -13
- package/dist/elements/textIconButton/TextIconButton.d.ts +19 -19
- package/dist/helpers/classnames.d.ts +5 -5
- package/dist/helpers/getIcon.d.ts +2 -2
- package/dist/helpers/index.d.ts +3 -3
- package/dist/helpers/tagCategoryIcon.d.ts +38 -38
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useEventListener.d.ts +3 -0
- package/dist/hooks/useKeyboardNavigation.d.ts +21 -0
- package/dist/icons/echoAssets/external.d.ts +5 -3
- package/dist/icons/echoAssets/index.d.ts +3 -2
- package/dist/icons/echoAssets/notifications.d.ts +9 -0
- package/dist/icons/echoAssets/workOrders.d.ts +11 -0
- package/dist/icons/index.d.ts +3 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.js +1789 -580
- package/dist/index.js.map +1 -1
- package/dist/setupTests.d.ts +1 -1
- package/dist/structure/iconList/IconList.d.ts +32 -32
- package/dist/structure/iconList/createListRow.d.ts +14 -14
- package/dist/structure/index.d.ts +3 -3
- package/dist/structure/linkCard/LinkCard.d.ts +26 -26
- package/dist/structure/optionsList/OptionsList.d.ts +24 -24
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/themeConst.d.ts +65 -65
- package/dist/types/actionButton.d.ts +6 -6
- package/dist/types/dataInformation.d.ts +8 -8
- package/dist/types/draggableItem.d.ts +5 -5
- package/dist/types/expandableRowProps.d.ts +6 -6
- package/dist/types/iconItem.d.ts +4 -4
- package/dist/types/iconListItem.d.ts +6 -6
- package/dist/types/index.d.ts +10 -10
- package/dist/types/linkCardItem.d.ts +5 -5
- package/dist/types/menuItem.d.ts +9 -9
- package/dist/types/optionsItem.d.ts +6 -6
- package/dist/types/radioButtonItem.d.ts +4 -4
- package/package.json +126 -126
- package/dist/icons/echoAssets/data.d.ts +0 -3
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MenuItem } from '../../../types/menuItem';
|
|
3
|
-
interface PanelWrapperProps {
|
|
4
|
-
menuItems: MenuItem[];
|
|
5
|
-
header: string | React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Component that display's the buttons in a panel. It will automatically try to calculate how many buttons to display
|
|
9
|
-
* and how many buttons to hide behind the more menu.
|
|
10
|
-
* It controls which panel to display when a button is clicked
|
|
11
|
-
* On desktop this component will render on the right side, and on the top in mobile view
|
|
12
|
-
*
|
|
13
|
-
* @param {*} {
|
|
14
|
-
* menuItems, the items to be displayed in the menu and its belonging panels
|
|
15
|
-
* header, the header that will be displayed on mobile.
|
|
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
|
-
* }
|
|
18
|
-
* @return {*} {JSX.Element}
|
|
19
|
-
*/
|
|
20
|
-
export declare const PanelWrapper: React.FC<PanelWrapperProps>;
|
|
21
|
-
export default PanelWrapper;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuItem } from '../../../types/menuItem';
|
|
3
|
+
interface PanelWrapperProps {
|
|
4
|
+
menuItems: MenuItem[];
|
|
5
|
+
header: string | React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Component that display's the buttons in a panel. It will automatically try to calculate how many buttons to display
|
|
9
|
+
* and how many buttons to hide behind the more menu.
|
|
10
|
+
* It controls which panel to display when a button is clicked
|
|
11
|
+
* On desktop this component will render on the right side, and on the top in mobile view
|
|
12
|
+
*
|
|
13
|
+
* @param {*} {
|
|
14
|
+
* menuItems, the items to be displayed in the menu and its belonging panels
|
|
15
|
+
* header, the header that will be displayed on mobile.
|
|
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
|
+
* }
|
|
18
|
+
* @return {*} {JSX.Element}
|
|
19
|
+
*/
|
|
20
|
+
export declare const PanelWrapper: React.FC<PanelWrapperProps>;
|
|
21
|
+
export default PanelWrapper;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PanelContextState } from './PanelContextWrapper';
|
|
2
|
-
/**
|
|
3
|
-
* Hook that exposes panel context, if not used within a PanelContext this hook will throw an error
|
|
4
|
-
*
|
|
5
|
-
* @export
|
|
6
|
-
* @return {*} {PanelContextState} Returns the existing panel context or throws error if not used within a PanelContext
|
|
7
|
-
*/
|
|
8
|
-
export declare function usePanelContext(): PanelContextState;
|
|
1
|
+
import { PanelContextState } from './PanelContextWrapper';
|
|
2
|
+
/**
|
|
3
|
+
* Hook that exposes panel context, if not used within a PanelContext this hook will throw an error
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @return {*} {PanelContextState} Returns the existing panel context or throws error if not used within a PanelContext
|
|
7
|
+
*/
|
|
8
|
+
export declare function usePanelContext(): PanelContextState;
|
|
@@ -1,41 +1,61 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type
|
|
3
|
-
export interface SidebarButtonProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type ButtonPosition = 'right' | 'bottom' | 'left' | 'tab';
|
|
3
|
+
export interface SidebarButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* The text below the icon.
|
|
6
|
+
*/
|
|
7
|
+
text: string;
|
|
8
|
+
/**
|
|
9
|
+
* Boolean describing the button's active state.
|
|
10
|
+
*/
|
|
11
|
+
active: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The onClick event.
|
|
14
|
+
*/
|
|
15
|
+
onClick: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Will display a count on the button, and must be bigger than 0.
|
|
18
|
+
*/
|
|
19
|
+
count?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Decides the active border. Could be set to 'right'/'bottom'/'left', depending if the button is placed in the right bar/left bar/bottom bar, or could be set to 'tab' if it's a tab button.
|
|
22
|
+
*/
|
|
23
|
+
buttonPosition: ButtonPosition;
|
|
24
|
+
/**
|
|
25
|
+
* A reference value, in case it's needed.
|
|
26
|
+
*/
|
|
27
|
+
refValue?: React.RefObject<HTMLButtonElement>;
|
|
28
|
+
/**
|
|
29
|
+
* The id of the button, in case it's needed.
|
|
30
|
+
*/
|
|
31
|
+
id?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The icon to be displayed.
|
|
34
|
+
*/
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The reusable button component that is used in the sidebars/bottom bar.
|
|
39
|
+
*
|
|
40
|
+
* On desktop it will have an active border on the left/right/top,
|
|
41
|
+
* depending if the ButtonPosition is set to: "right"/"left"/"bottom".
|
|
42
|
+
* The active border will be on the right if it's a tab button and ButtonPosition is set to: "tab".
|
|
43
|
+
*
|
|
44
|
+
* On mobile with the right sidebar, the active border will be on the bottom.
|
|
45
|
+
* In landscape mode with the bottom bar, the active border will be on the right.
|
|
46
|
+
*
|
|
47
|
+
* The button contains an icon and a descriptive text.
|
|
48
|
+
* @param {*} {
|
|
49
|
+
* text: the text below the icon.
|
|
50
|
+
* active: boolean describing the button's active state.
|
|
51
|
+
* onClick: the onClick event.
|
|
52
|
+
* count: will display a count on the button.
|
|
53
|
+
* buttonPosition: decides the active border, depending if the button is placed in the right bar/left bar/bottom bar.
|
|
54
|
+
* refValue: a reference value, in case it's needed.
|
|
55
|
+
* id: the id of the button, in case it's needed.
|
|
56
|
+
* children: the icon to be displayed.
|
|
57
|
+
* }
|
|
58
|
+
* @return {*} {JSX.Element}
|
|
59
|
+
*/
|
|
60
|
+
export declare const SidebarButton: React.FC<SidebarButtonProps>;
|
|
61
|
+
export default SidebarButton;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare enum SideSheetOrientation {
|
|
2
|
-
Vertical = "vertical",
|
|
3
|
-
Horizontal = "horizontal",
|
|
4
|
-
Fullscreen = "fullscreen"
|
|
5
|
-
}
|
|
1
|
+
export declare enum SideSheetOrientation {
|
|
2
|
+
Vertical = "vertical",
|
|
3
|
+
Horizontal = "horizontal",
|
|
4
|
+
Fullscreen = "fullscreen"
|
|
5
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SideSheetOrientation } from './enums';
|
|
3
|
-
import { SheetProps } from './sheet';
|
|
4
|
-
import { SheetTopAreaProps } from './sheetTopArea';
|
|
5
|
-
interface SideSheetProps extends SheetProps, SheetTopAreaProps {
|
|
6
|
-
open: boolean;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
declare function SideSheet({ open, side, orientation, floating, children, className, style, ...topBarProps }: SideSheetProps): JSX.Element | null;
|
|
10
|
-
export type { SideSheetProps };
|
|
11
|
-
export { SideSheet, SideSheetOrientation };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SideSheetOrientation } from './enums';
|
|
3
|
+
import { SheetProps } from './sheet';
|
|
4
|
+
import { SheetTopAreaProps } from './sheetTopArea';
|
|
5
|
+
interface SideSheetProps extends SheetProps, SheetTopAreaProps {
|
|
6
|
+
open: boolean;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function SideSheet({ open, side, orientation, floating, children, className, style, ...topBarProps }: SideSheetProps): JSX.Element | null;
|
|
10
|
+
export type { SideSheetProps };
|
|
11
|
+
export { SideSheet, SideSheetOrientation };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import { SideSheetOrientation } from '../enums';
|
|
3
|
-
interface Style {
|
|
4
|
-
style?: CSSProperties;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
interface SheetProps extends Style {
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
side?: 'left' | 'right';
|
|
10
|
-
orientation?: SideSheetOrientation;
|
|
11
|
-
/**
|
|
12
|
-
* Default true. Use this to make Sheet push content to the side.
|
|
13
|
-
* Only affects "vertical" orientation.
|
|
14
|
-
*/
|
|
15
|
-
floating?: boolean;
|
|
16
|
-
}
|
|
17
|
-
declare function Sheet({ side, orientation, floating, children, className, style }: SheetProps): JSX.Element;
|
|
18
|
-
export type { SheetProps };
|
|
19
|
-
export { Sheet };
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { SideSheetOrientation } from '../enums';
|
|
3
|
+
interface Style {
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
interface SheetProps extends Style {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
side?: 'left' | 'right';
|
|
10
|
+
orientation?: SideSheetOrientation;
|
|
11
|
+
/**
|
|
12
|
+
* Default true. Use this to make Sheet push content to the side.
|
|
13
|
+
* Only affects "vertical" orientation.
|
|
14
|
+
*/
|
|
15
|
+
floating?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare function Sheet({ side, orientation, floating, children, className, style }: SheetProps): JSX.Element;
|
|
18
|
+
export type { SheetProps };
|
|
19
|
+
export { Sheet };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Sheet';
|
|
1
|
+
export * from './Sheet';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SideSheetOrientation } from '../enums';
|
|
2
|
-
export declare function getSheetContainerClass(side?: 'left' | 'right', orientation?: SideSheetOrientation, floating?: boolean): string;
|
|
1
|
+
import { SideSheetOrientation } from '../enums';
|
|
2
|
+
export declare function getSheetContainerClass(side?: 'left' | 'right', orientation?: SideSheetOrientation, floating?: boolean): string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SideSheetOrientation } from '../enums';
|
|
3
|
-
interface SheetTopAreaProps extends Partial<SheetOrientationActionsProps> {
|
|
4
|
-
closeSheet: () => void;
|
|
5
|
-
previous?: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
declare function SheetTopArea({ orientation, onOrientationChange, closeSheet, previous }: SheetTopAreaProps): JSX.Element;
|
|
8
|
-
interface SheetOrientationActionsProps {
|
|
9
|
-
orientation: SideSheetOrientation;
|
|
10
|
-
/**
|
|
11
|
-
* Providing this function allows the developer to control sheet orientation.
|
|
12
|
-
*/
|
|
13
|
-
onOrientationChange: (orientationTarget: SideSheetOrientation) => void;
|
|
14
|
-
}
|
|
15
|
-
export type { SheetTopAreaProps };
|
|
16
|
-
export { SheetTopArea };
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SideSheetOrientation } from '../enums';
|
|
3
|
+
interface SheetTopAreaProps extends Partial<SheetOrientationActionsProps> {
|
|
4
|
+
closeSheet: () => void;
|
|
5
|
+
previous?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare function SheetTopArea({ orientation, onOrientationChange, closeSheet, previous }: SheetTopAreaProps): JSX.Element;
|
|
8
|
+
interface SheetOrientationActionsProps {
|
|
9
|
+
orientation: SideSheetOrientation;
|
|
10
|
+
/**
|
|
11
|
+
* Providing this function allows the developer to control sheet orientation.
|
|
12
|
+
*/
|
|
13
|
+
onOrientationChange: (orientationTarget: SideSheetOrientation) => void;
|
|
14
|
+
}
|
|
15
|
+
export type { SheetTopAreaProps };
|
|
16
|
+
export { SheetTopArea };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './SheetTopArea';
|
|
1
|
+
export * from './SheetTopArea';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SplitViewProps {
|
|
3
|
+
children: [React.ReactChild, React.ReactChild];
|
|
4
|
+
}
|
|
5
|
+
declare function SplitView({ children }: SplitViewProps): JSX.Element;
|
|
6
|
+
interface RightProps {
|
|
7
|
+
children: React.ReactChild;
|
|
8
|
+
}
|
|
9
|
+
declare function Right({ children }: RightProps): JSX.Element;
|
|
10
|
+
export { SplitView, Right };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Left } from './left/SplitViewLeft';
|
|
2
|
+
import { Right, SplitView as BaseSplitView } from './SplitView';
|
|
3
|
+
declare type SplitViewCompoundProps = typeof BaseSplitView & {
|
|
4
|
+
Left: typeof Left;
|
|
5
|
+
Right: typeof Right;
|
|
6
|
+
};
|
|
7
|
+
declare const SplitView: SplitViewCompoundProps;
|
|
8
|
+
export { SplitView };
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface TagContextMenuProps {
|
|
3
|
-
expanded: boolean;
|
|
4
|
-
setExpanded: (expanded: boolean) => void;
|
|
5
|
-
tagNo: string;
|
|
6
|
-
description: string;
|
|
7
|
-
openTagInformation: () => void;
|
|
8
|
-
selected: boolean;
|
|
9
|
-
selectedClassName?: string;
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Component that renders a tag context menu that can be expanded and closed upon click
|
|
14
|
-
* The condensed variant will only display the the relevant tag icon
|
|
15
|
-
* The expanded variant will display relevant tag icon, tag number and tag description
|
|
16
|
-
*
|
|
17
|
-
* @param {TagContextMenuProps} {
|
|
18
|
-
* expanded: flag that state if the context menu should be expanded or not
|
|
19
|
-
* setExpanded: method to update the expanded flag
|
|
20
|
-
* tagNo: the tag no to display
|
|
21
|
-
* description: the tag description
|
|
22
|
-
* openTagInformation: method called when expanded context menu is called
|
|
23
|
-
* selected: Flag to handle if there are multiple context menu's on a page, and a selected style should be applied
|
|
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
|
-
* children: Meant to be used to pass TagIcon component to this component
|
|
26
|
-
* }
|
|
27
|
-
* @return {*} {JSX.Element} a tag context menu for the provided properties
|
|
28
|
-
*/
|
|
29
|
-
export declare const TagContextMenu: React.FC<TagContextMenuProps>;
|
|
30
|
-
export default TagContextMenu;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TagContextMenuProps {
|
|
3
|
+
expanded: boolean;
|
|
4
|
+
setExpanded: (expanded: boolean) => void;
|
|
5
|
+
tagNo: string;
|
|
6
|
+
description: string;
|
|
7
|
+
openTagInformation: () => void;
|
|
8
|
+
selected: boolean;
|
|
9
|
+
selectedClassName?: string;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Component that renders a tag context menu that can be expanded and closed upon click
|
|
14
|
+
* The condensed variant will only display the the relevant tag icon
|
|
15
|
+
* The expanded variant will display relevant tag icon, tag number and tag description
|
|
16
|
+
*
|
|
17
|
+
* @param {TagContextMenuProps} {
|
|
18
|
+
* expanded: flag that state if the context menu should be expanded or not
|
|
19
|
+
* setExpanded: method to update the expanded flag
|
|
20
|
+
* tagNo: the tag no to display
|
|
21
|
+
* description: the tag description
|
|
22
|
+
* openTagInformation: method called when expanded context menu is called
|
|
23
|
+
* selected: Flag to handle if there are multiple context menu's on a page, and a selected style should be applied
|
|
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
|
+
* children: Meant to be used to pass TagIcon component to this component
|
|
26
|
+
* }
|
|
27
|
+
* @return {*} {JSX.Element} a tag context menu for the provided properties
|
|
28
|
+
*/
|
|
29
|
+
export declare const TagContextMenu: React.FC<TagContextMenuProps>;
|
|
30
|
+
export default TagContextMenu;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface TimePickerProps {
|
|
3
|
-
id: string;
|
|
4
|
-
value?: string;
|
|
5
|
-
label: string;
|
|
6
|
-
onValueChanged?: (time: string) => void;
|
|
7
|
-
className?: string;
|
|
8
|
-
readOnly?: boolean;
|
|
9
|
-
timeRange?: string[];
|
|
10
|
-
}
|
|
11
|
-
export declare const TimePicker: React.FC<TimePickerProps>;
|
|
12
|
-
export default TimePicker;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TimePickerProps {
|
|
3
|
+
id: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
label: string;
|
|
6
|
+
onValueChanged?: (time: string) => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
timeRange?: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare const TimePicker: React.FC<TimePickerProps>;
|
|
12
|
+
export default TimePicker;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import { DraggableItem } from '../../types/draggableItem';
|
|
3
|
-
export interface DraggableItemsWrapperProps {
|
|
4
|
-
style?: CSSProperties;
|
|
5
|
-
onChange: (newDragItems: DraggableItem[], oldIndex: number | undefined, newIndex: number | undefined) => void;
|
|
6
|
-
children: React.ReactNode[];
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Component that renders a wrapper for items that are draggable
|
|
10
|
-
*
|
|
11
|
-
* @param {DraggableItemsWrapperProps} {
|
|
12
|
-
* style: style element to override wrapper style
|
|
13
|
-
* onChange: method that will be called when elements have be reordered inside the wrapper
|
|
14
|
-
* children: list of elements that can be reordered
|
|
15
|
-
* }
|
|
16
|
-
* @return {*} {JSX.Element}
|
|
17
|
-
*/
|
|
18
|
-
export declare const DraggableItemsWrapper: React.FC<DraggableItemsWrapperProps>;
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { DraggableItem } from '../../types/draggableItem';
|
|
3
|
+
export interface DraggableItemsWrapperProps {
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
onChange: (newDragItems: DraggableItem[], oldIndex: number | undefined, newIndex: number | undefined) => void;
|
|
6
|
+
children: React.ReactNode[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Component that renders a wrapper for items that are draggable
|
|
10
|
+
*
|
|
11
|
+
* @param {DraggableItemsWrapperProps} {
|
|
12
|
+
* style: style element to override wrapper style
|
|
13
|
+
* onChange: method that will be called when elements have be reordered inside the wrapper
|
|
14
|
+
* children: list of elements that can be reordered
|
|
15
|
+
* }
|
|
16
|
+
* @return {*} {JSX.Element}
|
|
17
|
+
*/
|
|
18
|
+
export declare const DraggableItemsWrapper: React.FC<DraggableItemsWrapperProps>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface IconProps {
|
|
3
|
-
name: string;
|
|
4
|
-
color: string;
|
|
5
|
-
title?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
size?: 16 | 24 | 32 | 40 | 48;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Component that work's as a eds icon wrapper, it imports all eds possible icons
|
|
11
|
-
*
|
|
12
|
-
* @param {IconProps} {
|
|
13
|
-
* name: The name of the icon to be displayed
|
|
14
|
-
* title: The html title to use
|
|
15
|
-
* color:The color to icon should have
|
|
16
|
-
* size: The wanted size of the icon. Possible values are 16, 24, 32, 40 and 48
|
|
17
|
-
* }
|
|
18
|
-
* @return {*} {JSX.Element} A icon for the provided information
|
|
19
|
-
*/
|
|
20
|
-
export declare const Icon: React.FC<IconProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IconProps {
|
|
3
|
+
name: string;
|
|
4
|
+
color: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
size?: 16 | 24 | 32 | 40 | 48;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Component that work's as a eds icon wrapper, it imports all eds possible icons
|
|
11
|
+
*
|
|
12
|
+
* @param {IconProps} {
|
|
13
|
+
* name: The name of the icon to be displayed
|
|
14
|
+
* title: The html title to use
|
|
15
|
+
* color:The color to icon should have
|
|
16
|
+
* size: The wanted size of the icon. Possible values are 16, 24, 32, 40 and 48
|
|
17
|
+
* }
|
|
18
|
+
* @return {*} {JSX.Element} A icon for the provided information
|
|
19
|
+
*/
|
|
20
|
+
export declare const Icon: React.FC<IconProps>;
|
package/dist/elements/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './draggableItemsWrapper/DraggableItemsWrapper';
|
|
2
|
-
export { Icon } from './icon/Icon';
|
|
3
|
-
export { RadioButtonGroup } from './radioButtonGroup/RadioButtonGroup';
|
|
4
|
-
export * from './roundIconButton/RoundIconButton';
|
|
5
|
-
export { SliderField } from './sliderField/SliderField';
|
|
6
|
-
export { TagIcon } from './tagIcon/TagIcon';
|
|
7
|
-
export { TagIconShadowWrapper } from './tagIcon/TagIconShadow';
|
|
8
|
-
export * from './textIconButton/TextIconButton';
|
|
1
|
+
export * from './draggableItemsWrapper/DraggableItemsWrapper';
|
|
2
|
+
export { Icon } from './icon/Icon';
|
|
3
|
+
export { RadioButtonGroup } from './radioButtonGroup/RadioButtonGroup';
|
|
4
|
+
export * from './roundIconButton/RoundIconButton';
|
|
5
|
+
export { SliderField } from './sliderField/SliderField';
|
|
6
|
+
export { TagIcon } from './tagIcon/TagIcon';
|
|
7
|
+
export { TagIconShadowWrapper } from './tagIcon/TagIconShadow';
|
|
8
|
+
export * from './textIconButton/TextIconButton';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import { RadioButtonItem } from '../../types/radioButtonItem';
|
|
3
|
-
export interface RadioButtonGroupProps {
|
|
4
|
-
title: string;
|
|
5
|
-
options: RadioButtonItem[];
|
|
6
|
-
style?: CSSProperties;
|
|
7
|
-
onSelected: (index: number) => void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Component that renders a Radio Button Group with a set of options to choose from
|
|
11
|
-
*
|
|
12
|
-
* @param {RadioButtonGroupProps} {
|
|
13
|
-
* title: The title of the radio button group,
|
|
14
|
-
* options: List of items to be displayed as options,
|
|
15
|
-
* style: Style element to override wrapper style,
|
|
16
|
-
* onSelected: Method to be called when the selected value is changed
|
|
17
|
-
* }
|
|
18
|
-
* @return {*} {JSX.Element}
|
|
19
|
-
*/
|
|
20
|
-
export declare const RadioButtonGroup: React.FC<RadioButtonGroupProps>;
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { RadioButtonItem } from '../../types/radioButtonItem';
|
|
3
|
+
export interface RadioButtonGroupProps {
|
|
4
|
+
title: string;
|
|
5
|
+
options: RadioButtonItem[];
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
onSelected: (index: number) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Component that renders a Radio Button Group with a set of options to choose from
|
|
11
|
+
*
|
|
12
|
+
* @param {RadioButtonGroupProps} {
|
|
13
|
+
* title: The title of the radio button group,
|
|
14
|
+
* options: List of items to be displayed as options,
|
|
15
|
+
* style: Style element to override wrapper style,
|
|
16
|
+
* onSelected: Method to be called when the selected value is changed
|
|
17
|
+
* }
|
|
18
|
+
* @return {*} {JSX.Element}
|
|
19
|
+
*/
|
|
20
|
+
export declare const RadioButtonGroup: React.FC<RadioButtonGroupProps>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React, { EventHandler, ReactElement, SyntheticEvent } from 'react';
|
|
2
|
-
export declare enum RoundIconButtonVariants {
|
|
3
|
-
OpenCloseButton = "openCloseButton",
|
|
4
|
-
ToggleButton = "toggleButton"
|
|
5
|
-
}
|
|
6
|
-
export interface RoundIconButtonProps {
|
|
7
|
-
label: string;
|
|
8
|
-
active?: boolean;
|
|
9
|
-
variant?: RoundIconButtonVariants;
|
|
10
|
-
children?: ReactElement;
|
|
11
|
-
onClick?: EventHandler<SyntheticEvent>;
|
|
12
|
-
}
|
|
13
|
-
export declare const RoundIconButton: React.FC<RoundIconButtonProps>;
|
|
1
|
+
import React, { EventHandler, ReactElement, SyntheticEvent } from 'react';
|
|
2
|
+
export declare enum RoundIconButtonVariants {
|
|
3
|
+
OpenCloseButton = "openCloseButton",
|
|
4
|
+
ToggleButton = "toggleButton"
|
|
5
|
+
}
|
|
6
|
+
export interface RoundIconButtonProps {
|
|
7
|
+
label: string;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
variant?: RoundIconButtonVariants;
|
|
10
|
+
children?: ReactElement;
|
|
11
|
+
onClick?: EventHandler<SyntheticEvent>;
|
|
12
|
+
}
|
|
13
|
+
export declare const RoundIconButton: React.FC<RoundIconButtonProps>;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
export interface SliderFieldProps {
|
|
3
|
-
value: number;
|
|
4
|
-
min: number;
|
|
5
|
-
max: number;
|
|
6
|
-
labels?: string[];
|
|
7
|
-
title: string;
|
|
8
|
-
onChange: (value: number) => void;
|
|
9
|
-
style?: CSSProperties;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Component that renders a slider with numeric or custom values
|
|
13
|
-
*
|
|
14
|
-
* @param {SliderFieldProps} {
|
|
15
|
-
* value: Current value of the slider,
|
|
16
|
-
* min: Minimum value of the slider,
|
|
17
|
-
* max: Maximum value of the slider,
|
|
18
|
-
* labels: List of labels to use if the slider should not display numeric values,
|
|
19
|
-
* title: Text shown as title of the slider,
|
|
20
|
-
* onChange: Method that will be called if the slider value is changed,
|
|
21
|
-
* style: style element to override wrapper style
|
|
22
|
-
* }
|
|
23
|
-
* @return {*} {JSX.Element}
|
|
24
|
-
*/
|
|
25
|
-
export declare const SliderField: React.FC<SliderFieldProps>;
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
export interface SliderFieldProps {
|
|
3
|
+
value: number;
|
|
4
|
+
min: number;
|
|
5
|
+
max: number;
|
|
6
|
+
labels?: string[];
|
|
7
|
+
title: string;
|
|
8
|
+
onChange: (value: number) => void;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Component that renders a slider with numeric or custom values
|
|
13
|
+
*
|
|
14
|
+
* @param {SliderFieldProps} {
|
|
15
|
+
* value: Current value of the slider,
|
|
16
|
+
* min: Minimum value of the slider,
|
|
17
|
+
* max: Maximum value of the slider,
|
|
18
|
+
* labels: List of labels to use if the slider should not display numeric values,
|
|
19
|
+
* title: Text shown as title of the slider,
|
|
20
|
+
* onChange: Method that will be called if the slider value is changed,
|
|
21
|
+
* style: style element to override wrapper style
|
|
22
|
+
* }
|
|
23
|
+
* @return {*} {JSX.Element}
|
|
24
|
+
*/
|
|
25
|
+
export declare const SliderField: React.FC<SliderFieldProps>;
|