@equinor/echo-components 0.5.4 → 0.5.5

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.
Files changed (66) hide show
  1. package/dist/components/buttonWithPopover/ButtonWithPopover.d.ts +21 -0
  2. package/dist/components/contextMenu/ContextMenu.d.ts +35 -0
  3. package/dist/components/contextMenuPopover/DataInfoButton.d.ts +19 -0
  4. package/dist/components/contextMenuPopover/DataInfoPopover.d.ts +18 -0
  5. package/dist/components/datePicker/PopupHeader.d.ts +19 -0
  6. package/dist/components/datePicker/ReactDatePicker.d.ts +19 -0
  7. package/dist/components/dialogGenerator/DialogGenerator.d.ts +26 -0
  8. package/dist/components/dropdown/Dropdown.d.ts +37 -0
  9. package/dist/components/echoBottomBar/EchoBottomBar.d.ts +7 -0
  10. package/dist/components/echoCard/Body.d.ts +7 -0
  11. package/dist/components/echoCard/DateSection.d.ts +8 -0
  12. package/dist/components/echoCard/EchoCard.d.ts +7 -0
  13. package/dist/components/echoCard/LinkSection.d.ts +8 -0
  14. package/dist/components/echoCard/Title.d.ts +13 -0
  15. package/dist/components/echoCard/index.d.ts +14 -0
  16. package/dist/components/echoHeader/EchoHeader.d.ts +20 -0
  17. package/dist/components/index.d.ts +14 -0
  18. package/dist/components/inlineTagIconLink/InlineTagIconLink.d.ts +12 -0
  19. package/dist/components/listRow/ListRow.d.ts +29 -0
  20. package/dist/components/sidesheet/enums.d.ts +5 -0
  21. package/dist/components/sidesheet/index.d.ts +11 -0
  22. package/dist/components/sidesheet/sheet/Sheet.d.ts +19 -0
  23. package/dist/components/sidesheet/sheet/index.d.ts +1 -0
  24. package/dist/components/sidesheet/sheet/utils.d.ts +2 -0
  25. package/dist/components/sidesheet/sheetTopArea/SheetTopArea.d.ts +16 -0
  26. package/dist/components/sidesheet/sheetTopArea/index.d.ts +1 -0
  27. package/dist/components/tagContextMenu/TagContextMenu.d.ts +30 -0
  28. package/dist/components/timePicker/TimePicker.d.ts +12 -0
  29. package/dist/elements/draggableItemsWrapper/DraggableItemsWrapper.d.ts +18 -0
  30. package/dist/elements/icon/Icon.d.ts +20 -0
  31. package/dist/elements/index.d.ts +8 -0
  32. package/dist/elements/radioButtonGroup/RadioButtonGroup.d.ts +20 -0
  33. package/dist/elements/roundIconButton/RoundIconButton.d.ts +13 -0
  34. package/dist/elements/sliderField/SliderField.d.ts +25 -0
  35. package/dist/elements/tagIcon/TagIcon.d.ts +16 -0
  36. package/dist/elements/tagIcon/TagIconShadow.d.ts +13 -0
  37. package/dist/elements/textIconButton/TextIconButton.d.ts +19 -0
  38. package/dist/helpers/getIcon.d.ts +2 -0
  39. package/dist/helpers/index.d.ts +2 -0
  40. package/dist/helpers/tagCategoryIcon.d.ts +38 -0
  41. package/dist/icons/echoAssets/data.d.ts +3 -0
  42. package/dist/icons/echoAssets/external.d.ts +3 -0
  43. package/dist/icons/echoAssets/index.d.ts +5 -0
  44. package/dist/icons/index.d.ts +1 -0
  45. package/dist/index.d.ts +8 -0
  46. package/dist/index.js +20374 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/setupTests.d.ts +1 -0
  49. package/dist/structure/iconList/IconList.d.ts +32 -0
  50. package/dist/structure/iconList/createListRow.d.ts +14 -0
  51. package/dist/structure/index.d.ts +3 -0
  52. package/dist/structure/linkCard/LinkCard.d.ts +26 -0
  53. package/dist/structure/optionsList/OptionsList.d.ts +24 -0
  54. package/dist/theme/index.d.ts +1 -0
  55. package/dist/theme/themeConst.d.ts +65 -0
  56. package/dist/types/actionButton.d.ts +6 -0
  57. package/dist/types/dataInformation.d.ts +8 -0
  58. package/dist/types/draggableItem.d.ts +5 -0
  59. package/dist/types/expandableRowProps.d.ts +6 -0
  60. package/dist/types/iconItem.d.ts +4 -0
  61. package/dist/types/iconListItem.d.ts +6 -0
  62. package/dist/types/index.d.ts +9 -0
  63. package/dist/types/linkCardItem.d.ts +5 -0
  64. package/dist/types/optionsItem.d.ts +6 -0
  65. package/dist/types/radioButtonItem.d.ts +4 -0
  66. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { DataInformation } from '../../types/dataInformation';
3
+ export interface ButtonWithPopoverProps {
4
+ onShowMoreClicked: () => void;
5
+ fetchedData: DataInformation[];
6
+ isLoading: boolean;
7
+ expanded: boolean;
8
+ }
9
+ /**
10
+ * Component that renders a round button, that opens a popover upon being clicked
11
+ *
12
+ * @param {ButtonWithPopoverProps} {
13
+ * onShowMoreClicked: method called upon button clicked
14
+ * fetchedData: array of DataInformation that popover should be displayed when button is clicked.
15
+ * Meant to be the return value of the fetchDataToShow method
16
+ * isLoading: flag to show loading state if data fetch takes some time
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
19
+ */
20
+ export declare const ButtonWithPopover: React.FC<ButtonWithPopoverProps>;
21
+ export default ButtonWithPopover;
@@ -0,0 +1,35 @@
1
+ import React, { CSSProperties } from 'react';
2
+ interface ContextMenuProps {
3
+ icon: JSX.Element;
4
+ legendColor: string;
5
+ expanded: boolean;
6
+ setExpanded: (expanded: boolean) => void;
7
+ tagNo: string;
8
+ description: string;
9
+ positionStyle: CSSProperties;
10
+ openTagInformation: () => void;
11
+ selectedClassName?: string;
12
+ selected: boolean;
13
+ children?: React.ReactNode;
14
+ }
15
+ /**
16
+ * Component that renders full context menu functionality, meant for displaying tag context menu.
17
+ * With the ability to provide more information button and related popover that should be wrapped with the context menu
18
+ *
19
+ * @param {ContextMenuProps} {
20
+ * icon: icon to be displayed
21
+ * expanded: flag to determine if context menu should be expanded or not
22
+ * legendColor: color used for the tag icon
23
+ * setExpanded: method to update expanded flag
24
+ * tagNo: The tag number to display
25
+ * description: The tag description to display
26
+ * positionStyle: The position styling element used to position the context menu
27
+ * openTagInformation: Method that will be called when expanded context menu is clicked
28
+ * selected: Flag to handle if there are multiple context menu's on a page, and a selected style should be applied
29
+ * 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
30
+ * children: Related elements to display, e.g. more information button
31
+ * }
32
+ * @return {*} {JSX.Element} Context menu with relevant children wrapped
33
+ */
34
+ export declare const ContextMenu: React.FC<ContextMenuProps>;
35
+ export default ContextMenu;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { DataInformation } from '../../types/dataInformation';
3
+ export interface DataInfoButtonProps {
4
+ data: DataInformation;
5
+ }
6
+ /**
7
+ * Component that renders a data information button with a badge to indicate the number of items under that scoped type
8
+ *
9
+ * @param {DataInfoButtonProps} { data } Contains data information related to how the button should be rendered
10
+ * numberOfItems: If number is 1 or less no badge will be displayed on the button. If number is over 99,
11
+ * then the text 99+ will be displayed. Otherwise the provided number will be displayed
12
+ * label: The name of the data type, will be displayed on the button
13
+ * ariaLabel: The aria label set on the button, if empty the label will be used
14
+ * onTagInfoClicked: The method to be called when button is pressed
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
17
+ */
18
+ export declare const DataInfoButton: React.FC<DataInfoButtonProps>;
19
+ export default DataInfoButton;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { DataInformation } from '../../types/dataInformation';
3
+ export interface DataInfoPopoverProps {
4
+ dataToShow: DataInformation[];
5
+ isLoading: boolean;
6
+ }
7
+ /**
8
+ * Component that renders a popover with data information buttons
9
+ *
10
+ * @param {DataInfoPopoverProps} {
11
+ * dataToShow: list of DataInformation objects to be displayed.
12
+ * The itemType in these objects are used to group them together in the popover
13
+ * isLoading: loading flag that tells if a dot progress should be displayed if data is being fetched
14
+ * }
15
+ * @return {*} {JSX.Element} Popover with data information buttons based on the provided DataInformation objects
16
+ */
17
+ declare const DataInfoPopover: React.FC<DataInfoPopoverProps>;
18
+ export default DataInfoPopover;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export interface PopupHeaderProps {
3
+ monthDate: Date;
4
+ date: Date;
5
+ changeYear: (year: number) => void;
6
+ changeMonth: (month: number) => void;
7
+ customHeaderCount: number;
8
+ decreaseMonth: VoidFunction;
9
+ increaseMonth: VoidFunction;
10
+ prevMonthButtonDisabled: boolean;
11
+ nextMonthButtonDisabled: boolean;
12
+ decreaseYear: VoidFunction;
13
+ increaseYear: VoidFunction;
14
+ prevYearButtonDisabled: boolean;
15
+ nextYearButtonDisabled: boolean;
16
+ changeDate?: (date: Date) => void;
17
+ }
18
+ declare const PopupHeader: React.FC<PopupHeaderProps>;
19
+ export default PopupHeader;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import 'react-datepicker/dist/react-datepicker.css';
3
+ import './reactDatePicker.css';
4
+ declare type PopperPlacement = 'auto-start' | 'auto' | 'auto-end' | 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
5
+ export interface DatePickerProps {
6
+ id: string;
7
+ value: Date | undefined | null;
8
+ label: string;
9
+ onChanged(date: Date | null): void;
10
+ disableFuture?: boolean;
11
+ disableBeforeDate?: Date;
12
+ className?: string;
13
+ popperPlacement?: PopperPlacement;
14
+ showTimeSelect?: boolean;
15
+ maxDate?: Date;
16
+ minDate?: Date;
17
+ }
18
+ export declare const ReactDatePicker: React.FC<DatePickerProps>;
19
+ export default ReactDatePicker;
@@ -0,0 +1,26 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import { ActionButton } from '../../types/actionButton';
3
+ export interface DialogGeneratorProps {
4
+ dialogStyle?: CSSProperties;
5
+ children: React.ReactNode;
6
+ title: string;
7
+ actionButtons: ActionButton[];
8
+ open: boolean;
9
+ isDismissable?: boolean;
10
+ onClose?: () => void;
11
+ }
12
+ /**
13
+ * Component that renders a dialog box based on input properties
14
+ *
15
+ * @param {DialogGeneratorProps} {
16
+ * dialogStyle: style property to override existing styling on the dialog wrapper
17
+ * title: the title of the dialog
18
+ * children: The main content of the dialog
19
+ * actionButtons: the buttons to show in the dialog
20
+ * open: if the dialog should be open
21
+ * isDismissable: if the modal is closable by clicking aside or by hitting ESC key
22
+ * onClose: callback to be called when the dialog is closed
23
+ * }
24
+ * @return {*} {JSX.Element} Dialog component
25
+ */
26
+ export declare const DialogGenerator: React.FC<DialogGeneratorProps>;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ interface DropdownItemProps {
3
+ selected: string;
4
+ setSelected: (selected: string) => void;
5
+ data: any[];
6
+ openDownWards: boolean;
7
+ placeholder: string;
8
+ filterFunc?: (data: any[], filter: string) => any[];
9
+ isDisabled?: boolean;
10
+ disabledText?: string;
11
+ maxCharacterCount?: number;
12
+ variant?: 'compact' | 'default';
13
+ showSearch: boolean;
14
+ position?: 'relative' | 'absolute';
15
+ triggerOpen?: (value: boolean) => void;
16
+ }
17
+ /**
18
+ * Component that renders a dropdown menu, e.g., for a plant selector.
19
+ * Additional possibility to make the list searchable by adding a search field.
20
+ * @param {DropdownItemProps} {
21
+ * selected: The item that is currently selected from the list.
22
+ * data: The list of data items to be displayed in the dropdown.
23
+ * placeholder: Placeholder text to be displayed when no item is selected.
24
+ * openDownWards: Flag which decides if the menu is opened downwards or upwards.
25
+ * filterFunc: Function which filters the list of data based on the value of the search field.
26
+ * setSelected: Function for setting the selected item.
27
+ * isDisabled: Flag which disables the dropdown.
28
+ * disabledText: The title text that displays when the dropdown is disabled.
29
+ * variant: Decides which style the dropdown should have. Either default or compact.
30
+ * showSearch: Flag which decides whether we should include the search field or not.
31
+ * position: Determines if the dropdown position should be relative or absolute.
32
+ * triggerOpen: Callback to trigger when the dropdown is opened.
33
+ * }
34
+ * @return {*} {JSX.Element} The dropdown component.
35
+ */
36
+ export declare const Dropdown: React.FC<DropdownItemProps>;
37
+ export default Dropdown;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface EchoBottomBarProps {
3
+ children: React.ReactNode;
4
+ style?: React.CSSProperties;
5
+ }
6
+ export declare const EchoBottomBar: React.FC<EchoBottomBarProps>;
7
+ export default EchoBottomBar;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare type BodyProps = {
3
+ children?: React.ReactNode;
4
+ className?: string;
5
+ bodyText?: string;
6
+ };
7
+ export declare const Body: ({ bodyText, children, className }: Partial<BodyProps>) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare type DateSectionProps = {
3
+ date?: Date | null;
4
+ dateSectionText?: string;
5
+ children?: React.ReactNode;
6
+ className?: string;
7
+ };
8
+ export declare const DateSection: ({ dateSectionText, date, children, className }: Partial<DateSectionProps>) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface EchoCardProps {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ }
7
+ export declare const EchoCard: React.FC<EchoCardProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { CardIcons } from './Title';
3
+ export declare type LinkSectionProps = {
4
+ children?: React.ReactNode;
5
+ linkSectionIcons?: CardIcons[];
6
+ className?: string;
7
+ };
8
+ export declare const LinkSection: ({ children, className, linkSectionIcons }: Partial<LinkSectionProps>) => JSX.Element;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export interface CardIcons {
3
+ name: string;
4
+ color: string;
5
+ onClick?: () => void;
6
+ }
7
+ export declare type TitleProps = {
8
+ headerTitle?: string;
9
+ onHeaderClick?: () => void;
10
+ headerIcons?: CardIcons[];
11
+ className?: string;
12
+ };
13
+ export declare const Title: ({ headerTitle, headerIcons, className, onHeaderClick }: Partial<TitleProps>) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { Body, BodyProps } from './Body';
2
+ import { DateSection, DateSectionProps } from './DateSection';
3
+ import { EchoCard as BaseEchoCard, EchoCardProps } from './EchoCard';
4
+ import { LinkSection } from './LinkSection';
5
+ import { Title, TitleProps } from './Title';
6
+ declare type CardType = typeof BaseEchoCard & {
7
+ Title: typeof Title;
8
+ Body: typeof Body;
9
+ LinkSection: typeof LinkSection;
10
+ DateSection: typeof DateSection;
11
+ };
12
+ declare const EchoCard: CardType;
13
+ export { EchoCard };
14
+ export type { EchoCardProps, TitleProps, DateSectionProps, BodyProps };
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ export interface EchoHeaderProps {
3
+ moduleTitle: string;
4
+ moduleIcon: string | React.FC;
5
+ plantName?: string;
6
+ customHeaderSection?: React.FC;
7
+ }
8
+ /**
9
+ * Component that renders the Echo header
10
+ *
11
+ * @param {EchoHeaderProps} {
12
+ * moduleTitle: the title of the module
13
+ * moduleIcon: the module Icon
14
+ * plantName: show the plant name next to the module title
15
+ * customSection: a section in the header where there can be custom components
16
+ * }
17
+ * @returns {*} {JSX.Element} Echo header with custom section
18
+ */
19
+ export declare const EchoHeader: React.FC<EchoHeaderProps>;
20
+ export default EchoHeader;
@@ -0,0 +1,14 @@
1
+ export * from './buttonWithPopover/ButtonWithPopover';
2
+ export * from './contextMenu/ContextMenu';
3
+ export * from './contextMenuPopover/DataInfoButton';
4
+ export * from './datePicker/ReactDatePicker';
5
+ export * from './dialogGenerator/DialogGenerator';
6
+ export * from './dropdown/Dropdown';
7
+ export * from './echoBottomBar/EchoBottomBar';
8
+ export * from './echoCard/index';
9
+ export * from './echoHeader/EchoHeader';
10
+ export * from './inlineTagIconLink/InlineTagIconLink';
11
+ export * from './listRow/ListRow';
12
+ export * from './sidesheet';
13
+ export * from './tagContextMenu/TagContextMenu';
14
+ export * from './timePicker/TimePicker';
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export interface InlineTagIconLinkProps {
3
+ onClickHandler?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
4
+ tagNo: string;
5
+ description: string;
6
+ tagCategoryDescription?: string;
7
+ icon?: string | React.ReactNode;
8
+ legendColor: string;
9
+ disableHover?: boolean;
10
+ }
11
+ export declare const InlineTagIconLink: React.FC<InlineTagIconLinkProps>;
12
+ export default InlineTagIconLink;
@@ -0,0 +1,29 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import { ExpandableRowProps, IconListItem } from '@types';
3
+ export interface ListRowProps {
4
+ isDraggable: boolean;
5
+ item: IconListItem;
6
+ expandable?: ExpandableRowProps;
7
+ rowIndex: number;
8
+ style?: CSSProperties;
9
+ }
10
+ /**
11
+ * Component that renders one row in a list. The row can be marked as draggable and expandable
12
+ *
13
+ * @param {ListRowProps} {
14
+ * isDraggable: flag to indicate that the row can be rearranged in a list
15
+ * item: { The item to be rendered in the row
16
+ * title: the title of the item in the row
17
+ * subtitle: the subtitle of the item in the row
18
+ * icons: the icons that will be displayed on the same row, and their respective actions
19
+ * }
20
+ * expandable: { object with properties to handle if the row is expandable. If undefined the row cannot be expanded
21
+ * iconItems: the items that will be displayed if row is expanded, and their respective actions
22
+ * expanded: flag to indicate if the row is expanded or not
23
+ * setExpanded: method that updates the expanded flag
24
+ * }
25
+ * style: style element to override wrapper style
26
+ * }
27
+ * @return {*} {JSX.Element} a row element to be used in a list
28
+ */
29
+ export declare const ListRow: React.FC<ListRowProps>;
@@ -0,0 +1,5 @@
1
+ export declare enum SideSheetOrientation {
2
+ Vertical = "vertical",
3
+ Horizontal = "horizontal",
4
+ Fullscreen = "fullscreen"
5
+ }
@@ -0,0 +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 };
@@ -0,0 +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 };
@@ -0,0 +1 @@
1
+ export * from './Sheet';
@@ -0,0 +1,2 @@
1
+ import { SideSheetOrientation } from '../enums';
2
+ export declare function getSheetContainerClass(side?: 'left' | 'right', orientation?: SideSheetOrientation, floating?: boolean): string;
@@ -0,0 +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 };
@@ -0,0 +1 @@
1
+ export * from './SheetTopArea';
@@ -0,0 +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;
@@ -0,0 +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;
@@ -0,0 +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>;
@@ -0,0 +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>;
@@ -0,0 +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';
@@ -0,0 +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>;
@@ -0,0 +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>;
@@ -0,0 +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>;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ interface TagIconProps {
3
+ icon: JSX.Element;
4
+ legendColor: string;
5
+ }
6
+ /**
7
+ * Component that will wrap the provided icon with a background color (usually the legend color)
8
+ *
9
+ * @param {TagIconProps} {
10
+ * icon: Icon to be wrapped
11
+ * legendColor: background color to apply. Need to be valid css color
12
+ * }
13
+ * @return {*} {JSX.Element} Wrapped icon with provided color
14
+ */
15
+ export declare const TagIcon: React.FC<TagIconProps>;
16
+ export default TagIcon;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface TagIconShadowWrapperProps {
3
+ children: React.ReactNode;
4
+ }
5
+ /**
6
+ * Component that will wrap the provided child element in a shadow.
7
+ * Should be used to add shadow to the tagIcon component
8
+ *
9
+ * @param {TagIconShadowWrapperProps} { children } Child element to wrap
10
+ * @return {*} {JSX.Element} wrapped child element in a shadow
11
+ */
12
+ export declare const TagIconShadowWrapper: React.FC<TagIconShadowWrapperProps>;
13
+ export default TagIconShadowWrapper;
@@ -0,0 +1,19 @@
1
+ import React, { CSSProperties } from 'react';
2
+ export interface TextIconButtonProps {
3
+ icon: string | React.FC;
4
+ title: string;
5
+ onClick: () => void;
6
+ style?: CSSProperties;
7
+ }
8
+ /**
9
+ * Component that renders a button with the icon and the text provided
10
+ *
11
+ * @param {TextIconButtonProps} {
12
+ * icon: the name of the icon to display
13
+ * title: the title text that the button should display
14
+ * onClick: the function that will be called when user clicks the button
15
+ * style: Optional parameter that will override the button style
16
+ * }
17
+ * @return {*} {JSX.Element} A button with the provided icon and text
18
+ */
19
+ export declare const TextIconButton: React.FC<TextIconButtonProps>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function getIcon(tagCategoryDescription: string): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './getIcon';
2
+ export * from './tagCategoryIcon';