@equinor/echo-components 0.5.19-rc1 → 0.5.24
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/echoTooltip/Tooltip/Tooltip.d.ts +10 -10
- package/dist/components/echoTooltip/Tooltip/useTooltip.d.ts +85 -51
- package/dist/components/echoTooltip/index.d.ts +10 -10
- package/dist/components/floatingActionButton/FloatingActionButton.d.ts +33 -33
- package/dist/components/floatingSearchBar/FloatingSearchBar.d.ts +31 -31
- package/dist/components/index.d.ts +22 -22
- 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/PanelStore.d.ts +9 -9
- package/dist/components/rightPanel/index.d.ts +6 -5
- package/dist/components/rightPanel/menuButton/MenuButton.d.ts +24 -24
- package/dist/components/rightPanel/panel/Panel.d.ts +25 -18
- package/dist/components/rightPanel/panelContent/PanelContent.d.ts +23 -23
- package/dist/components/rightPanel/panelContent/PanelContentWrapper.d.ts +16 -0
- package/dist/components/rightPanel/panelWrapper/PanelWrapper.d.ts +21 -21
- package/dist/components/sidebarButton/SidebarButton.d.ts +61 -61
- 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 +14 -14
- package/dist/components/splitView/index.d.ts +8 -8
- package/dist/components/splitView/left/SplitViewLeft.d.ts +9 -9
- package/dist/components/tagContextMenu/TagContextMenu.d.ts +30 -30
- package/dist/components/timePicker/TimePicker.d.ts +12 -12
- package/dist/components/workOrderListItem/WorkOrderStatusLabel.d.ts +11 -11
- package/dist/components/workOrderListItem/WorkOrdertListItem.d.ts +10 -10
- 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 +3 -3
- package/dist/hooks/useEventListener.d.ts +3 -3
- package/dist/hooks/useIsMobile.d.ts +5 -5
- package/dist/hooks/useKeyboardNavigation.d.ts +21 -21
- package/dist/icons/echoAssets/external.d.ts +5 -5
- package/dist/icons/echoAssets/index.d.ts +4 -4
- package/dist/icons/echoAssets/notifications.d.ts +9 -9
- package/dist/icons/echoAssets/punches.d.ts +4 -4
- package/dist/icons/echoAssets/workOrders.d.ts +11 -11
- package/dist/icons/index.d.ts +3 -3
- package/dist/index.d.ts +9 -9
- package/dist/index.js +1762 -1504
- 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 +66 -66
- 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 +11 -11
- package/dist/types/linkCardItem.d.ts +5 -5
- package/dist/types/menuItem.d.ts +11 -11
- package/dist/types/optionsItem.d.ts +6 -6
- package/dist/types/radioButtonItem.d.ts +4 -4
- package/dist/types/workOrderItem.d.ts +9 -9
- package/dist/utils/date.d.ts +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/workorder.d.ts +3 -3
- package/package.json +125 -125
|
@@ -1,22 +1,22 @@
|
|
|
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 './echoTooltip';
|
|
11
|
-
export * from './floatingActionButton/FloatingActionButton';
|
|
12
|
-
export * from './floatingSearchBar/FloatingSearchBar';
|
|
13
|
-
export * from './inlineTagIconLink/InlineTagIconLink';
|
|
14
|
-
export * from './listItem';
|
|
15
|
-
export * from './listRow/ListRow';
|
|
16
|
-
export * from './rightPanel';
|
|
17
|
-
export * from './sidebarButton/SidebarButton';
|
|
18
|
-
export * from './sidesheet';
|
|
19
|
-
export * from './splitView';
|
|
20
|
-
export * from './tagContextMenu/TagContextMenu';
|
|
21
|
-
export * from './timePicker/TimePicker';
|
|
22
|
-
export * from './workOrderListItem/WorkOrdertListItem';
|
|
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 './echoTooltip';
|
|
11
|
+
export * from './floatingActionButton/FloatingActionButton';
|
|
12
|
+
export * from './floatingSearchBar/FloatingSearchBar';
|
|
13
|
+
export * from './inlineTagIconLink/InlineTagIconLink';
|
|
14
|
+
export * from './listItem';
|
|
15
|
+
export * from './listRow/ListRow';
|
|
16
|
+
export * from './rightPanel';
|
|
17
|
+
export * from './sidebarButton/SidebarButton';
|
|
18
|
+
export * from './sidesheet';
|
|
19
|
+
export * from './splitView';
|
|
20
|
+
export * from './tagContextMenu/TagContextMenu';
|
|
21
|
+
export * from './timePicker/TimePicker';
|
|
22
|
+
export * from './workOrderListItem/WorkOrdertListItem';
|
|
@@ -1,12 +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;
|
|
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;
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
interface VisualComponent {
|
|
3
|
-
icon?: never;
|
|
4
|
-
visual?: React.ReactNode;
|
|
5
|
-
}
|
|
6
|
-
interface IconOptions {
|
|
7
|
-
icon?: {
|
|
8
|
-
name: string;
|
|
9
|
-
color?: string;
|
|
10
|
-
backgroundColor?: string;
|
|
11
|
-
};
|
|
12
|
-
visual?: never;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Make property "icon" and "visual" mutually exclusive
|
|
16
|
-
*/
|
|
17
|
-
type WithVisualOrIconOptions = VisualComponent | IconOptions;
|
|
18
|
-
interface ListItemBaseProps {
|
|
19
|
-
/**
|
|
20
|
-
* Add List Action Area
|
|
21
|
-
*/
|
|
22
|
-
listAction?: React.ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
* Main content Area
|
|
25
|
-
*/
|
|
26
|
-
primary: string | React.ReactNode;
|
|
27
|
-
secondary?: string | React.ReactNode;
|
|
28
|
-
tertiary?: string | React.ReactNode;
|
|
29
|
-
/**
|
|
30
|
-
* Caption Area
|
|
31
|
-
*/
|
|
32
|
-
caption?: string | React.ReactNode;
|
|
33
|
-
/**
|
|
34
|
-
* Add Item Action Area
|
|
35
|
-
*/
|
|
36
|
-
itemAction?: React.ReactNode;
|
|
37
|
-
/**
|
|
38
|
-
* Change container element. Default is "li"
|
|
39
|
-
*/
|
|
40
|
-
as?: React.ElementType;
|
|
41
|
-
onCardClick?: () => void;
|
|
42
|
-
/**
|
|
43
|
-
* Style Modification
|
|
44
|
-
*/
|
|
45
|
-
className?: string;
|
|
46
|
-
style?: CSSProperties;
|
|
47
|
-
}
|
|
48
|
-
export type ListItemProps = ListItemBaseProps & WithVisualOrIconOptions;
|
|
49
|
-
declare function ListItem(props: ListItemProps): JSX.Element;
|
|
50
|
-
export { ListItem };
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
interface VisualComponent {
|
|
3
|
+
icon?: never;
|
|
4
|
+
visual?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
interface IconOptions {
|
|
7
|
+
icon?: {
|
|
8
|
+
name: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
};
|
|
12
|
+
visual?: never;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Make property "icon" and "visual" mutually exclusive
|
|
16
|
+
*/
|
|
17
|
+
type WithVisualOrIconOptions = VisualComponent | IconOptions;
|
|
18
|
+
interface ListItemBaseProps {
|
|
19
|
+
/**
|
|
20
|
+
* Add List Action Area
|
|
21
|
+
*/
|
|
22
|
+
listAction?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Main content Area
|
|
25
|
+
*/
|
|
26
|
+
primary: string | React.ReactNode;
|
|
27
|
+
secondary?: string | React.ReactNode;
|
|
28
|
+
tertiary?: string | React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Caption Area
|
|
31
|
+
*/
|
|
32
|
+
caption?: string | React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Add Item Action Area
|
|
35
|
+
*/
|
|
36
|
+
itemAction?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Change container element. Default is "li"
|
|
39
|
+
*/
|
|
40
|
+
as?: React.ElementType;
|
|
41
|
+
onCardClick?: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Style Modification
|
|
44
|
+
*/
|
|
45
|
+
className?: string;
|
|
46
|
+
style?: CSSProperties;
|
|
47
|
+
}
|
|
48
|
+
export type ListItemProps = ListItemBaseProps & WithVisualOrIconOptions;
|
|
49
|
+
declare function ListItem(props: ListItemProps): JSX.Element;
|
|
50
|
+
export { ListItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './ListItem';
|
|
1
|
+
export * from './ListItem';
|
|
@@ -1,29 +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>;
|
|
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>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { PanelSize } from '@types';
|
|
2
|
-
import * as zustand from 'zustand';
|
|
3
|
-
export interface PanelState {
|
|
4
|
-
activePanel: string | undefined;
|
|
5
|
-
panelSize: PanelSize;
|
|
6
|
-
updateActivePanel: (newActivePanel: string | undefined) => void;
|
|
7
|
-
updatePanelSize: (newPanelSize: PanelSize) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const usePanelStore: zustand.UseBoundStore<zustand.StoreApi<PanelState>>;
|
|
1
|
+
import { PanelSize } from '@types';
|
|
2
|
+
import * as zustand from 'zustand';
|
|
3
|
+
export interface PanelState {
|
|
4
|
+
activePanel: string | undefined;
|
|
5
|
+
panelSize: PanelSize;
|
|
6
|
+
updateActivePanel: (newActivePanel: string | undefined) => void;
|
|
7
|
+
updatePanelSize: (newPanelSize: PanelSize) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const usePanelStore: zustand.UseBoundStore<zustand.StoreApi<PanelState>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from './menuButton/MenuButton';
|
|
2
|
-
export * from './panel/Panel';
|
|
3
|
-
export * from './panelContent/PanelContent';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
1
|
+
export * from './menuButton/MenuButton';
|
|
2
|
+
export * from './panel/Panel';
|
|
3
|
+
export * from './panelContent/PanelContent';
|
|
4
|
+
export * from './panelContent/PanelContentWrapper';
|
|
5
|
+
export * from './PanelStore';
|
|
6
|
+
export * from './panelWrapper/PanelWrapper';
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface MenuButtonProps {
|
|
3
|
-
text: string;
|
|
4
|
-
active: boolean;
|
|
5
|
-
onClick: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
id?: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* The menu bottom items
|
|
11
|
-
* On desktop it will have an active border on the left,
|
|
12
|
-
* and on mobile the active border will be on the bottom
|
|
13
|
-
* Contains an icon and a descriptive text
|
|
14
|
-
* @param {*} {
|
|
15
|
-
* text, the text below the icon, also displayed on hover
|
|
16
|
-
* active, boolean describing the buttons active state
|
|
17
|
-
* children, the icon to be displayed
|
|
18
|
-
* onClick, the on click event
|
|
19
|
-
* id: the id of the button in case its needed
|
|
20
|
-
* }
|
|
21
|
-
* @return {*} {JSX.Element}
|
|
22
|
-
*/
|
|
23
|
-
declare const MenuButton: React.ForwardRefExoticComponent<MenuButtonProps & React.RefAttributes<HTMLButtonElement | null>>;
|
|
24
|
-
export default MenuButton;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface MenuButtonProps {
|
|
3
|
+
text: string;
|
|
4
|
+
active: boolean;
|
|
5
|
+
onClick: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
id?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The menu bottom items
|
|
11
|
+
* On desktop it will have an active border on the left,
|
|
12
|
+
* and on mobile the active border will be on the bottom
|
|
13
|
+
* Contains an icon and a descriptive text
|
|
14
|
+
* @param {*} {
|
|
15
|
+
* text, the text below the icon, also displayed on hover
|
|
16
|
+
* active, boolean describing the buttons active state
|
|
17
|
+
* children, the icon to be displayed
|
|
18
|
+
* onClick, the on click event
|
|
19
|
+
* id: the id of the button in case its needed
|
|
20
|
+
* }
|
|
21
|
+
* @return {*} {JSX.Element}
|
|
22
|
+
*/
|
|
23
|
+
export declare const MenuButton: React.ForwardRefExoticComponent<MenuButtonProps & React.RefAttributes<HTMLButtonElement | null>>;
|
|
24
|
+
export default MenuButton;
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MenuItem } from '../../../types/menuItem';
|
|
3
|
-
interface PanelProps {
|
|
4
|
-
menuItems: MenuItem[];
|
|
5
|
-
header: string | React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* The actual right side panel. This component wraps the panel with a panel state
|
|
9
|
-
*
|
|
10
|
-
* @param {PanelProps} {
|
|
11
|
-
* menuItems
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuItem } from '../../../types/menuItem';
|
|
3
|
+
interface PanelProps {
|
|
4
|
+
menuItems: MenuItem[];
|
|
5
|
+
header: string | React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The actual right side panel. This component wraps the panel with a panel state
|
|
9
|
+
*
|
|
10
|
+
* @param {PanelProps} {
|
|
11
|
+
* menuItems: the items to be displayed in the menu and its belonging panels
|
|
12
|
+
* labelId: the id of the menuItems
|
|
13
|
+
* label: the buttons label visible ot the user. Truncated if too long
|
|
14
|
+
* icon: the icon displayed for the button
|
|
15
|
+
* skipPanelContent: if true you have to provide your own menuButton and panel content
|
|
16
|
+
* isBottomItem: places the menuButton for this item at the bottom of the menu (desktop), has no effect on mobile.
|
|
17
|
+
* panelSize: decides the size of the panel. Narrow is 320 and wide is 480. Wide is default
|
|
18
|
+
* component: The panel component to display when panel is actibe
|
|
19
|
+
* header, the header that will be displayed on mobile.
|
|
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
|
+
* }
|
|
22
|
+
* @return {*} {JSX.Element}
|
|
23
|
+
*/
|
|
24
|
+
export declare const Panel: React.FC<PanelProps>;
|
|
25
|
+
export default Panel;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface PanelContentProps {
|
|
3
|
-
header: string;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
backToMainPanel?: () => void;
|
|
6
|
-
footer?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* The component that wraps the panel drawer content
|
|
10
|
-
* This components displays a header with close and possible back button
|
|
11
|
-
* It also displays the content wrapped with some css
|
|
12
|
-
*
|
|
13
|
-
* @param {PanelContentProps} {
|
|
14
|
-
* header, the header text to display
|
|
15
|
-
* children, the panels content
|
|
16
|
-
* backToMainPanel: optional parameter that controls whether the panel should have a back button or not
|
|
17
|
-
* to be used in cases where there are panels within panels,
|
|
18
|
-
* footer: optional param, if used a footer will be shown in the panel content
|
|
19
|
-
* }
|
|
20
|
-
* @return {*} {JSX.Element}
|
|
21
|
-
*/
|
|
22
|
-
export declare const PanelContent: React.FC<PanelContentProps>;
|
|
23
|
-
export default PanelContent;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PanelContentProps {
|
|
3
|
+
header: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
backToMainPanel?: () => void;
|
|
6
|
+
footer?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The component that wraps the panel drawer content
|
|
10
|
+
* This components displays a header with close and possible back button
|
|
11
|
+
* It also displays the content wrapped with some css
|
|
12
|
+
*
|
|
13
|
+
* @param {PanelContentProps} {
|
|
14
|
+
* header, the header text to display
|
|
15
|
+
* children, the panels content
|
|
16
|
+
* backToMainPanel: optional parameter that controls whether the panel should have a back button or not
|
|
17
|
+
* to be used in cases where there are panels within panels,
|
|
18
|
+
* footer: optional param, if used a footer will be shown in the panel content
|
|
19
|
+
* }
|
|
20
|
+
* @return {*} {JSX.Element}
|
|
21
|
+
*/
|
|
22
|
+
export declare const PanelContent: React.FC<PanelContentProps>;
|
|
23
|
+
export default PanelContent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PanelContentWrapperProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Component that can be used to wrap content within a panel
|
|
7
|
+
* This will give the whole content a scrollbar
|
|
8
|
+
* Has padding of 16px
|
|
9
|
+
*
|
|
10
|
+
* @param {PanelContentWrapperProps} {
|
|
11
|
+
* children, the panels content
|
|
12
|
+
* }
|
|
13
|
+
* @return {*} {JSX.Element}
|
|
14
|
+
*/
|
|
15
|
+
export declare const PanelContentWrapper: React.FC<PanelContentWrapperProps>;
|
|
16
|
+
export default PanelContentWrapper;
|
|
@@ -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,61 +1,61 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export 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
|
+
import React from 'react';
|
|
2
|
+
export 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 };
|