@equinor/echo-components 0.6.0-r18-rc0 → 0.6.2

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 (108) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +62 -62
  3. package/dist/components/blackLink/BlackLink.d.ts +11 -0
  4. package/dist/components/buttonWithPopover/ButtonWithPopover.d.ts +21 -21
  5. package/dist/components/contextMenu/ContextMenu.d.ts +35 -35
  6. package/dist/components/contextMenuPopover/DataInfoButton.d.ts +19 -19
  7. package/dist/components/contextMenuPopover/DataInfoPopover.d.ts +18 -18
  8. package/dist/components/copyToClipboard/CopyToClipboard.d.ts +6 -0
  9. package/dist/components/datePicker/PopupHeader.d.ts +19 -19
  10. package/dist/components/datePicker/ReactDatePicker.d.ts +19 -19
  11. package/dist/components/dialogGenerator/DialogGenerator.d.ts +26 -26
  12. package/dist/components/dropdown/Dropdown.d.ts +37 -37
  13. package/dist/components/echoBottomBar/EchoBottomBar.d.ts +7 -7
  14. package/dist/components/echoCard/Body.d.ts +7 -7
  15. package/dist/components/echoCard/DateSection.d.ts +8 -8
  16. package/dist/components/echoCard/EchoCard.d.ts +7 -7
  17. package/dist/components/echoCard/LinkSection.d.ts +8 -8
  18. package/dist/components/echoCard/Title.d.ts +13 -12
  19. package/dist/components/echoCard/index.d.ts +14 -14
  20. package/dist/components/echoHeader/EchoHeader.d.ts +20 -20
  21. package/dist/components/echoTooltip/Tooltip/Tooltip.d.ts +10 -10
  22. package/dist/components/echoTooltip/Tooltip/useTooltip.d.ts +85 -51
  23. package/dist/components/echoTooltip/index.d.ts +10 -10
  24. package/dist/components/floatingActionButton/FloatingActionButton.d.ts +33 -33
  25. package/dist/components/floatingSearchBar/FloatingSearchBar.d.ts +44 -31
  26. package/dist/components/index.d.ts +25 -22
  27. package/dist/components/inlineTagIconLink/InlineTagIconLink.d.ts +12 -12
  28. package/dist/components/legend/MainLegend.d.ts +14 -0
  29. package/dist/components/legend/index.d.ts +2 -0
  30. package/dist/components/legend/layerLegend/LayerLegend.d.ts +29 -0
  31. package/dist/components/legend/layerLegend/index.d.ts +1 -0
  32. package/dist/components/listItem/ListItem.d.ts +50 -50
  33. package/dist/components/listItem/index.d.ts +1 -1
  34. package/dist/components/listRow/ListRow.d.ts +29 -29
  35. package/dist/components/rightPanel/PanelStore.d.ts +9 -9
  36. package/dist/components/rightPanel/index.d.ts +6 -6
  37. package/dist/components/rightPanel/menuButton/MenuButton.d.ts +24 -24
  38. package/dist/components/rightPanel/panel/Panel.d.ts +25 -25
  39. package/dist/components/rightPanel/panelContent/PanelContent.d.ts +23 -23
  40. package/dist/components/rightPanel/panelContent/PanelContentWrapper.d.ts +16 -16
  41. package/dist/components/rightPanel/panelWrapper/PanelWrapper.d.ts +21 -21
  42. package/dist/components/sidebarButton/SidebarButton.d.ts +61 -61
  43. package/dist/components/sidesheet/enums.d.ts +5 -5
  44. package/dist/components/sidesheet/index.d.ts +11 -11
  45. package/dist/components/sidesheet/sheet/Sheet.d.ts +19 -19
  46. package/dist/components/sidesheet/sheet/index.d.ts +1 -1
  47. package/dist/components/sidesheet/sheet/utils.d.ts +2 -2
  48. package/dist/components/sidesheet/sheetTopArea/SheetTopArea.d.ts +16 -16
  49. package/dist/components/sidesheet/sheetTopArea/index.d.ts +1 -1
  50. package/dist/components/splitView/SplitView.d.ts +14 -14
  51. package/dist/components/splitView/index.d.ts +8 -8
  52. package/dist/components/splitView/left/SplitViewLeft.d.ts +9 -9
  53. package/dist/components/tagContextMenu/TagContextMenu.d.ts +30 -30
  54. package/dist/components/timePicker/TimePicker.d.ts +12 -12
  55. package/dist/components/workOrderListItem/{WorkOrdertListItem.d.ts → WorkOrderListItem.d.ts} +10 -10
  56. package/dist/components/workOrderListItem/WorkOrderStatusLabel.d.ts +6 -10
  57. package/dist/elements/draggableItemsWrapper/DraggableItemsWrapper.d.ts +18 -18
  58. package/dist/elements/icon/Icon.d.ts +20 -20
  59. package/dist/elements/index.d.ts +8 -8
  60. package/dist/elements/radioButtonGroup/RadioButtonGroup.d.ts +20 -20
  61. package/dist/elements/roundIconButton/RoundIconButton.d.ts +13 -13
  62. package/dist/elements/sliderField/SliderField.d.ts +25 -25
  63. package/dist/elements/tagIcon/TagIcon.d.ts +16 -16
  64. package/dist/elements/tagIcon/TagIconShadow.d.ts +13 -13
  65. package/dist/elements/textIconButton/TextIconButton.d.ts +19 -19
  66. package/dist/helpers/classnames.d.ts +5 -5
  67. package/dist/helpers/getIcon.d.ts +2 -1
  68. package/dist/helpers/index.d.ts +3 -3
  69. package/dist/helpers/tagCategoryIcon.d.ts +38 -38
  70. package/dist/hooks/index.d.ts +3 -3
  71. package/dist/hooks/useEventListener.d.ts +3 -3
  72. package/dist/hooks/useIsMobile.d.ts +5 -5
  73. package/dist/hooks/useKeyboardNavigation.d.ts +21 -21
  74. package/dist/icons/echoAssets/external.d.ts +5 -5
  75. package/dist/icons/echoAssets/general.d.ts +2 -0
  76. package/dist/icons/echoAssets/index.d.ts +5 -4
  77. package/dist/icons/echoAssets/notifications.d.ts +9 -9
  78. package/dist/icons/echoAssets/punches.d.ts +4 -4
  79. package/dist/icons/echoAssets/workOrders.d.ts +11 -11
  80. package/dist/icons/index.d.ts +3 -3
  81. package/dist/index.d.ts +9 -9
  82. package/dist/index.js +2385 -1788
  83. package/dist/index.js.map +1 -1
  84. package/dist/setupTests.d.ts +1 -1
  85. package/dist/structure/iconList/IconList.d.ts +32 -32
  86. package/dist/structure/iconList/createListRow.d.ts +14 -14
  87. package/dist/structure/index.d.ts +3 -3
  88. package/dist/structure/linkCard/LinkCard.d.ts +26 -26
  89. package/dist/structure/optionsList/OptionsList.d.ts +24 -24
  90. package/dist/theme/index.d.ts +1 -1
  91. package/dist/theme/themeConst.d.ts +66 -66
  92. package/dist/types/actionButton.d.ts +6 -6
  93. package/dist/types/dataInformation.d.ts +8 -8
  94. package/dist/types/draggableItem.d.ts +5 -5
  95. package/dist/types/expandableRowProps.d.ts +6 -6
  96. package/dist/types/iconItem.d.ts +4 -4
  97. package/dist/types/iconListItem.d.ts +6 -6
  98. package/dist/types/index.d.ts +12 -11
  99. package/dist/types/legend.d.ts +4 -0
  100. package/dist/types/linkCardItem.d.ts +5 -5
  101. package/dist/types/menuItem.d.ts +11 -11
  102. package/dist/types/optionsItem.d.ts +6 -6
  103. package/dist/types/radioButtonItem.d.ts +4 -4
  104. package/dist/types/workOrderItem.d.ts +9 -9
  105. package/dist/utils/date.d.ts +1 -1
  106. package/dist/utils/index.d.ts +2 -2
  107. package/dist/utils/workorder.d.ts +2 -3
  108. package/package.json +124 -121
@@ -1,7 +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>;
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>;
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import { CardIcons } from './Title';
3
- export 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;
1
+ import React from 'react';
2
+ import { CardIcons } from './Title';
3
+ export 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;
@@ -1,12 +1,13 @@
1
- export interface CardIcons {
2
- name: string;
3
- color: string;
4
- onClick?: () => void;
5
- }
6
- export type TitleProps = {
7
- headerTitle?: string;
8
- onHeaderClick?: () => void;
9
- headerIcons?: CardIcons[];
10
- className?: string;
11
- };
12
- export declare const Title: ({ headerTitle, headerIcons, className, onHeaderClick }: Partial<TitleProps>) => JSX.Element;
1
+ /// <reference types="react" />
2
+ export interface CardIcons {
3
+ name: string;
4
+ color: string;
5
+ onClick?: () => void;
6
+ }
7
+ export 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;
@@ -1,14 +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
- 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 };
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
+ 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 };
@@ -1,20 +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;
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;
@@ -1,10 +1,10 @@
1
- import React, { ReactNode } from 'react';
2
- import { TooltipOptions } from './useTooltip';
3
- declare function Tooltip({ children, ...options }: {
4
- children: ReactNode;
5
- } & TooltipOptions): JSX.Element;
6
- declare const TooltipAnchor: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & {
7
- asChild?: boolean | undefined;
8
- }, "ref"> & React.RefAttributes<HTMLElement>>;
9
- declare const TooltipContent: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- export { Tooltip, TooltipAnchor, TooltipContent };
1
+ import React, { ReactNode } from 'react';
2
+ import { TooltipOptions } from './useTooltip';
3
+ declare function Tooltip({ children, ...options }: {
4
+ children: ReactNode;
5
+ } & TooltipOptions): JSX.Element;
6
+ declare const TooltipAnchor: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & {
7
+ asChild?: boolean | undefined;
8
+ }, "ref"> & React.RefAttributes<HTMLElement>>;
9
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ export { Tooltip, TooltipAnchor, TooltipContent };
@@ -1,51 +1,85 @@
1
- /// <reference types="react" />
2
- import { Placement } from '@floating-ui/react';
3
- export interface TooltipOptions {
4
- initialOpen?: boolean;
5
- placement?: Placement;
6
- open?: boolean;
7
- onOpenChange?: (open: boolean) => void;
8
- }
9
- export type ContextType = ReturnType<typeof useTooltip> | null;
10
- declare function useTooltip({ initialOpen, placement, open: controlledOpen, onOpenChange: setControlledOpen }?: TooltipOptions): {
11
- placement: Placement;
12
- strategy: import("@floating-ui/react").Strategy;
13
- middlewareData: import("@floating-ui/react").MiddlewareData;
14
- x: number | null;
15
- y: number | null;
16
- update: () => void;
17
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
18
- floating: (node: HTMLElement | null) => void;
19
- positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
20
- context: import("@floating-ui/react").FloatingContext<import("@floating-ui/react").ReferenceType>;
21
- refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
22
- elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
23
- isPositioned: boolean;
24
- getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
25
- getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
26
- getItemProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
27
- open: boolean;
28
- setOpen: (open: boolean) => void;
29
- };
30
- declare const TooltipContext: import("react").Context<ContextType>;
31
- declare const useTooltipContext: () => {
32
- placement: Placement;
33
- strategy: import("@floating-ui/react").Strategy;
34
- middlewareData: import("@floating-ui/react").MiddlewareData;
35
- x: number | null;
36
- y: number | null;
37
- update: () => void;
38
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
39
- floating: (node: HTMLElement | null) => void;
40
- positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
41
- context: import("@floating-ui/react").FloatingContext<import("@floating-ui/react").ReferenceType>;
42
- refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
43
- elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
44
- isPositioned: boolean;
45
- getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
46
- getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
47
- getItemProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
48
- open: boolean;
49
- setOpen: (open: boolean) => void;
50
- };
51
- export { TooltipContext, useTooltip, useTooltipContext };
1
+ /// <reference types="react" />
2
+ import { Placement } from '@floating-ui/react';
3
+ export interface TooltipOptions {
4
+ initialOpen?: boolean;
5
+ placement?: Placement;
6
+ open?: boolean;
7
+ onOpenChange?: (open: boolean) => void;
8
+ }
9
+ export type ContextType = ReturnType<typeof useTooltip> | null;
10
+ declare function useTooltip({ initialOpen, placement, open: controlledOpen, onOpenChange: setControlledOpen }?: TooltipOptions): {
11
+ placement: Placement;
12
+ strategy: import("@floating-ui/react").Strategy;
13
+ middlewareData: import("@floating-ui/react").MiddlewareData;
14
+ x: number | null;
15
+ y: number | null;
16
+ update: () => void;
17
+ reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
18
+ floating: (node: HTMLElement | null) => void;
19
+ positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
20
+ context: {
21
+ x: number | null;
22
+ y: number | null;
23
+ update: () => void;
24
+ placement: Placement;
25
+ strategy: import("@floating-ui/react").Strategy;
26
+ middlewareData: import("@floating-ui/react").MiddlewareData;
27
+ reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
28
+ floating: (node: HTMLElement | null) => void;
29
+ isPositioned: boolean;
30
+ open: boolean;
31
+ onOpenChange: (open: boolean) => void;
32
+ events: import("@floating-ui/react").FloatingEvents;
33
+ dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
34
+ nodeId: string | undefined;
35
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
36
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
37
+ };
38
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
39
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
40
+ isPositioned: boolean;
41
+ getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
42
+ getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
43
+ getItemProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
44
+ open: boolean;
45
+ setOpen: (open: boolean) => void;
46
+ };
47
+ declare const TooltipContext: import("react").Context<ContextType>;
48
+ declare const useTooltipContext: () => {
49
+ placement: Placement;
50
+ strategy: import("@floating-ui/react").Strategy;
51
+ middlewareData: import("@floating-ui/react").MiddlewareData;
52
+ x: number | null;
53
+ y: number | null;
54
+ update: () => void;
55
+ reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
56
+ floating: (node: HTMLElement | null) => void;
57
+ positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
58
+ context: {
59
+ x: number | null;
60
+ y: number | null;
61
+ update: () => void;
62
+ placement: Placement;
63
+ strategy: import("@floating-ui/react").Strategy;
64
+ middlewareData: import("@floating-ui/react").MiddlewareData;
65
+ reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
66
+ floating: (node: HTMLElement | null) => void;
67
+ isPositioned: boolean;
68
+ open: boolean;
69
+ onOpenChange: (open: boolean) => void;
70
+ events: import("@floating-ui/react").FloatingEvents;
71
+ dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
72
+ nodeId: string | undefined;
73
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
74
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
75
+ };
76
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
77
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
78
+ isPositioned: boolean;
79
+ getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
80
+ getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
81
+ getItemProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
82
+ open: boolean;
83
+ setOpen: (open: boolean) => void;
84
+ };
85
+ export { TooltipContext, useTooltip, useTooltipContext };
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
- import { Tooltip } from './Tooltip/Tooltip';
3
- declare const EchoTooltip: Readonly<{
4
- Tooltip: typeof Tooltip;
5
- TooltipAnchor: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLProps<HTMLElement> & {
6
- asChild?: boolean | undefined;
7
- }, "ref"> & import("react").RefAttributes<HTMLElement>>;
8
- TooltipContent: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLProps<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
- }>;
10
- export { EchoTooltip };
1
+ /// <reference types="react" />
2
+ import { Tooltip } from './Tooltip/Tooltip';
3
+ declare const EchoTooltip: Readonly<{
4
+ Tooltip: typeof Tooltip;
5
+ TooltipAnchor: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLProps<HTMLElement> & {
6
+ asChild?: boolean | undefined;
7
+ }, "ref"> & import("react").RefAttributes<HTMLElement>>;
8
+ TooltipContent: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLProps<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
+ }>;
10
+ export { EchoTooltip };
@@ -1,33 +1,33 @@
1
- import React from 'react';
2
- interface WithLabel {
3
- variant: 'square_icon_with_text';
4
- label: string;
5
- }
6
- interface WithoutLabel {
7
- variant: 'circle_icon' | 'square_icon';
8
- label?: never;
9
- }
10
- type MutuallyExclusiveVariantLabel = WithLabel | WithoutLabel;
11
- export type FloatingActionButtonProps = MutuallyExclusiveVariantLabel & {
12
- iconName: string;
13
- ariaLabel?: string;
14
- /**
15
- * Disable button if true
16
- */
17
- disabled?: boolean;
18
- /**
19
- * Show button as active if true
20
- */
21
- active?: boolean;
22
- /**
23
- * The method to be called when button is pressed
24
- */
25
- onClick: () => void;
26
- };
27
- /**
28
- * Floating actions buttons exists within the viewport, seperated from any sheet, dialog or menu
29
- * and are typically used for special actions pertaining to the module they are used in.
30
- * @return {*} {JSX.Element} Floating actions button
31
- */
32
- declare const FloatingActionButton: React.FC<FloatingActionButtonProps>;
33
- export { FloatingActionButton };
1
+ import React from 'react';
2
+ interface WithLabel {
3
+ variant: 'square_icon_with_text';
4
+ label: string;
5
+ }
6
+ interface WithoutLabel {
7
+ variant: 'circle_icon' | 'square_icon';
8
+ label?: never;
9
+ }
10
+ type MutuallyExclusiveVariantLabel = WithLabel | WithoutLabel;
11
+ export type FloatingActionButtonProps = MutuallyExclusiveVariantLabel & {
12
+ iconName: string;
13
+ ariaLabel?: string;
14
+ /**
15
+ * Disable button if true
16
+ */
17
+ disabled?: boolean;
18
+ /**
19
+ * Show button as active if true
20
+ */
21
+ active?: boolean;
22
+ /**
23
+ * The method to be called when button is pressed
24
+ */
25
+ onClick: () => void;
26
+ };
27
+ /**
28
+ * Floating actions buttons exists within the viewport, seperated from any sheet, dialog or menu
29
+ * and are typically used for special actions pertaining to the module they are used in.
30
+ * @return {*} {JSX.Element} Floating actions button
31
+ */
32
+ declare const FloatingActionButton: React.FC<FloatingActionButtonProps>;
33
+ export { FloatingActionButton };
@@ -1,31 +1,44 @@
1
- import React from 'react';
2
- interface Suggestion {
3
- label: string;
4
- id: string;
5
- }
6
- export interface FloatingSearchBarProps {
7
- ariaLabel?: string;
8
- /**
9
- * Placeholder text
10
- */
11
- placeholder?: string;
12
- /**
13
- * Callback for when the search query changes
14
- */
15
- onSearchQueryChange: (value: string) => void;
16
- /**
17
- * Array of suggestions that matches the search query
18
- */
19
- suggestions?: Suggestion[];
20
- onSuggestionClick: (suggestion: Suggestion) => void;
21
- }
22
- /**
23
- * Floating search bar
24
- *
25
- * @param {FloatingSearchBarProps} {
26
- * }
27
- * @return {*} {JSX.Element}
28
- */
29
- declare const FloatingSearchBar: React.FC<FloatingSearchBarProps>;
30
- export { FloatingSearchBar };
31
- export type { Suggestion };
1
+ import React from 'react';
2
+ interface Suggestion {
3
+ label: string;
4
+ id: string;
5
+ iconName: string;
6
+ }
7
+ interface SuggestionGroup {
8
+ title?: string;
9
+ id: string;
10
+ options: Suggestion[];
11
+ }
12
+ export interface FloatingSearchBarProps {
13
+ ariaLabel?: string;
14
+ /**
15
+ * Placeholder text
16
+ */
17
+ placeholder?: string;
18
+ /**
19
+ * Callback for when the search query changes
20
+ */
21
+ onSearchQueryChange: (value: string) => void;
22
+ /**
23
+ * Suggestions that matches the search query by groups
24
+ */
25
+ suggestionGroups?: SuggestionGroup[];
26
+ onSuggestionClick: (suggestion: Suggestion) => void;
27
+ isLoading: boolean;
28
+ }
29
+ /**
30
+ * Floating search bar
31
+ *
32
+ * @param {FloatingSearchBarProps} {
33
+ * }
34
+ * @return {*} {JSX.Element}
35
+ */
36
+ declare const FloatingSearchBar: React.FC<FloatingSearchBarProps>;
37
+ interface SuggestionGroupProps {
38
+ suggestionGroup: SuggestionGroup;
39
+ onClick: (suggestion: Suggestion) => void;
40
+ focusedOption: number;
41
+ }
42
+ declare function SuggestionGroup({ suggestionGroup, onClick, focusedOption }: SuggestionGroupProps): JSX.Element;
43
+ export { FloatingSearchBar };
44
+ export type { Suggestion };
@@ -1,22 +1,25 @@
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 './blackLink/BlackLink';
2
+ export * from './buttonWithPopover/ButtonWithPopover';
3
+ export * from './contextMenu/ContextMenu';
4
+ export * from './contextMenuPopover/DataInfoButton';
5
+ export * from './copyToClipboard/CopyToClipboard';
6
+ export * from './datePicker/ReactDatePicker';
7
+ export * from './dialogGenerator/DialogGenerator';
8
+ export * from './dropdown/Dropdown';
9
+ export * from './echoBottomBar/EchoBottomBar';
10
+ export * from './echoCard/index';
11
+ export * from './echoHeader/EchoHeader';
12
+ export * from './echoTooltip';
13
+ export * from './floatingActionButton/FloatingActionButton';
14
+ export * from './floatingSearchBar/FloatingSearchBar';
15
+ export * from './inlineTagIconLink/InlineTagIconLink';
16
+ export * from './legend';
17
+ export * from './listItem';
18
+ export * from './listRow/ListRow';
19
+ export * from './rightPanel';
20
+ export * from './sidebarButton/SidebarButton';
21
+ export * from './sidesheet';
22
+ export * from './splitView';
23
+ export * from './tagContextMenu/TagContextMenu';
24
+ export * from './timePicker/TimePicker';
25
+ export * from './workOrderListItem/WorkOrderListItem';
@@ -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;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { LayerInfo } from '@types';
3
+ interface MainLegendProps {
4
+ /**
5
+ * Layer legends appearing above the main legend
6
+ */
7
+ legends: React.ReactNode[];
8
+ /**
9
+ * Layer information
10
+ */
11
+ layers: LayerInfo[];
12
+ }
13
+ declare function MainLegend({ legends, layers }: MainLegendProps): JSX.Element;
14
+ export { MainLegend };
@@ -0,0 +1,2 @@
1
+ export * from './MainLegend';
2
+ export * from './layerLegend';
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ interface LayerLegendProps {
3
+ /**
4
+ * Layer title
5
+ */
6
+ title: string;
7
+ /**
8
+ * Layer icon name
9
+ */
10
+ iconName?: string;
11
+ /**
12
+ * Number of items on layer
13
+ */
14
+ itemsCount: number;
15
+ /**
16
+ * Name of the items presented on layer
17
+ */
18
+ itemsTitle?: string;
19
+ /**
20
+ * Content presented on layer legend
21
+ */
22
+ children: React.ReactNode;
23
+ /**
24
+ * Used to disable layer legend usage
25
+ */
26
+ disabled?: boolean;
27
+ }
28
+ declare function LayerLegend({ title, iconName, itemsCount, itemsTitle, children, disabled }: LayerLegendProps): JSX.Element;
29
+ export { LayerLegend };
@@ -0,0 +1 @@
1
+ export * from './LayerLegend';