@equinor/echo-components 5.0.0-beta-r19 → 5.0.0-beta-r19-1
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/index.cjs.js +1 -1
- package/package.json +3 -3
- package/src/components/accordionWithSwitch/AccordionWithSwitch.d.ts +3 -1
- package/src/components/echoButton/EchoButton.d.ts +4 -4
- package/src/components/echoButton/EchoToggleButton.d.ts +2 -2
- package/src/components/echoToggleButtonGroup/EchoToggleButtonGroup.d.ts +30 -0
- package/src/components/index.d.ts +5 -0
- package/src/components/itemMarkerPopover/ItemMarkerPopover.d.ts +22 -0
- package/src/components/itemMarkerPopover/ItemMarkerPopoverContent.d.ts +10 -0
- package/src/components/itemMarkerPopover/ItemMarkerPopoverFooter.d.ts +9 -0
- package/src/components/itemMarkerPopover/ItemMarkerPopoverHeader.d.ts +25 -0
- package/src/components/itemMarkerPopover/OldItemMarkerPopover.d.ts +2 -2
- package/src/components/itemMarkerPopover/itemMarkerPopoverHeader/ItemMarkerPopoverHeaderPagination.d.ts +8 -0
- package/src/components/itemMarkerPopover/itemMarkerPopoverHeader/ItemMarkerPopoverHeaderTitle.d.ts +5 -0
- package/src/components/legendSelector/LegendSelector.d.ts +1 -1
- package/src/components/legendSelector/useVisibleLegends.d.ts +1 -1
- package/src/components/legendSelectorAccordion/LegendSelectorAccordion.d.ts +1 -0
- package/src/components/multilineTabs/MultilineTabs.d.ts +1 -0
- package/src/components/selectionBar/SelectionBar.d.ts +13 -0
- package/src/components/selectionBar/SelectionBarContent.d.ts +10 -0
- package/src/components/selectionBar/SelectionBarCounter.d.ts +16 -0
- package/src/components/selectionBar/SelectionBarFeedback.d.ts +20 -0
- package/src/components/selectionBar/menu/SelectionBarMenu.d.ts +29 -0
- package/src/components/selectionBar/menu/SelectionBarMenuItem.d.ts +24 -0
- package/src/components/selectionBar/selectionBarFeedback.types.d.ts +1 -0
- package/src/components/selectionColorPicker/SelectionColorPicker.d.ts +2 -1
- package/src/components/charts/lineChart/dummy/lineChartConfig.d.ts +0 -17
- package/src/components/charts/lineChart/dummy/rawData.d.ts +0 -26
- package/src/icons/echoAssets/legendMarkerChip.d.ts +0 -2
- package/src/theme/echoUI.generated.d.ts +0 -8
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-components",
|
|
3
|
-
"version": "5.0.0-beta-r19",
|
|
3
|
+
"version": "5.0.0-beta-r19-1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"chart.js": "4.5.1",
|
|
6
|
-
"react-datepicker": "
|
|
6
|
+
"react-datepicker": "9.1.0",
|
|
7
7
|
"react-swipeable": "7.0.2",
|
|
8
8
|
"react-window": "1.8.11"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@equinor/echo-utils": "5.0.0-beta-r19",
|
|
11
|
+
"@equinor/echo-utils": "5.0.0-beta-r19-1",
|
|
12
12
|
"@equinor/eds-core-react": "0.49.0",
|
|
13
13
|
"@equinor/eds-icons": "0.22.0",
|
|
14
14
|
"@equinor/eds-tokens": "2.1.0",
|
|
@@ -22,6 +22,8 @@ interface AccordionWithSwitchProps {
|
|
|
22
22
|
switchDisabled?: boolean;
|
|
23
23
|
/** Optional warning element to be displayed */
|
|
24
24
|
warning?: React.JSX.Element;
|
|
25
|
+
/** Optional test ID for the accordion */
|
|
26
|
+
testId?: string;
|
|
25
27
|
}
|
|
26
|
-
export declare const AccordionWithSwitch: ({ title, description, handleSwitchClick, children, descriptionHeading, disableAccordionOnSwitchOff, isExpanded, isToggledOn, switchDisabled, switchAriaLabel, warning }: AccordionWithSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const AccordionWithSwitch: ({ title, description, handleSwitchClick, children, descriptionHeading, disableAccordionOnSwitchOff, isExpanded, isToggledOn, switchDisabled, switchAriaLabel, warning, testId }: AccordionWithSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
29
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ButtonProps } from '@equinor/eds-core-react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export type EchoButtonProps = ButtonProps & {
|
|
4
|
-
isSelected?: boolean;
|
|
5
|
-
isLoading?: boolean;
|
|
6
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
4
|
+
readonly isSelected?: boolean;
|
|
5
|
+
readonly isLoading?: boolean;
|
|
6
|
+
readonly ref?: React.Ref<HTMLButtonElement>;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Wrapper for EDS Button with UI preferences support, and dark mode support (uses new light/dark CSS variables).
|
|
10
10
|
* This button component should be removed when EDS 1.0 is fully adopted, then we would use the button component from there.
|
|
11
11
|
* For now we need this to be able to implement temporary styles with dark support.
|
|
12
12
|
*/
|
|
13
|
-
export declare const EchoButton: (
|
|
13
|
+
export declare const EchoButton: (props: EchoButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EchoButtonProps } from './EchoButton';
|
|
3
|
-
type EchoToggleButtonProps = Omit<EchoButtonProps, 'variant'> & {
|
|
3
|
+
export type EchoToggleButtonProps = Omit<EchoButtonProps, 'variant' | 'color'> & {
|
|
4
4
|
isSelected?: boolean;
|
|
5
5
|
variant?: Exclude<EchoButtonProps['variant'], 'ghost' | 'ghost_icon'>;
|
|
6
|
+
color?: Exclude<EchoButtonProps['color'], 'danger'>;
|
|
6
7
|
};
|
|
7
8
|
/**
|
|
8
9
|
* Temporary EDS toggle button, remove when EDS 1.0 is available.
|
|
@@ -18,4 +19,3 @@ type EchoToggleButtonProps = Omit<EchoButtonProps, 'variant'> & {
|
|
|
18
19
|
export declare const EchoToggleButton: ({ children, className, isSelected, variant, ref, ...restProps }: EchoToggleButtonProps & {
|
|
19
20
|
ref?: React.Ref<HTMLButtonElement>;
|
|
20
21
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type EchoToggleButtonProps } from '../echoButton/EchoToggleButton';
|
|
3
|
+
export interface EchoToggleButtonGroupOption<T> {
|
|
4
|
+
readonly label: string | React.JSX.Element;
|
|
5
|
+
readonly value: T;
|
|
6
|
+
}
|
|
7
|
+
interface EchoToggleButtonGroupProps<T> {
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
readonly options: ReadonlyArray<EchoToggleButtonGroupOption<T>>;
|
|
10
|
+
readonly selectedOption: T;
|
|
11
|
+
readonly onOptionSelected?: (option: T, e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
12
|
+
readonly variant?: EchoToggleButtonProps['variant'];
|
|
13
|
+
readonly color?: EchoToggleButtonProps['color'];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* EchoToggleButtonGroup is a controlled component that renders a group of selectable buttons.
|
|
17
|
+
*
|
|
18
|
+
* Displays each option as a button, highlights the currently selected option, and calls the `onSelect` callback when a different option is chosen.
|
|
19
|
+
* Uses Echo UI components and compact density for consistent styling. Uses EDS colors with color-scheme for automatic dark mode support.
|
|
20
|
+
*
|
|
21
|
+
* @component
|
|
22
|
+
* @param {object} props - Component props
|
|
23
|
+
* @param {string} [props.className] - Optional additional CSS class for custom styling.
|
|
24
|
+
* @param {ReadonlyArray<EchoToggleButtonGroupOption<T>>} props.options - List of selectable options.
|
|
25
|
+
* @param {EchoToggleButtonGroupOption<T>} props.selectedOption - The currently selected option.
|
|
26
|
+
* @param {(option: T) => void} [props.onOptionSelected] - Callback invoked when a new option is selected.
|
|
27
|
+
* @returns {JSX.Element | null} The rendered button group, or null if no options are provided.
|
|
28
|
+
*/
|
|
29
|
+
export declare const EchoToggleButtonGroup: <T>(props: EchoToggleButtonGroupProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
30
|
+
export {};
|
|
@@ -18,6 +18,7 @@ export * from './echoButton/EchoToggleButton';
|
|
|
18
18
|
export * from './echoCard/index';
|
|
19
19
|
export * from './echoHeader/EchoHeader';
|
|
20
20
|
export * from './echoMenu/EchoMenu';
|
|
21
|
+
export * from './echoToggleButtonGroup/EchoToggleButtonGroup';
|
|
21
22
|
export * from './floatingActionButton';
|
|
22
23
|
export * from './floatingActionButton/FloatingActionButton';
|
|
23
24
|
export * from './functionalLocationListItem/FunctionalLocationListItem';
|
|
@@ -31,6 +32,7 @@ export type { ItemMarkerChipProps } from './itemMarker/ItemMarkerChip';
|
|
|
31
32
|
export * from './itemMarker/ItemMarkerIcon';
|
|
32
33
|
export * from './itemMarker/MultipleItemMarkers';
|
|
33
34
|
export * from './itemMarker/utils/itemMarkerUtils';
|
|
35
|
+
export * from './itemMarkerPopover/ItemMarkerPopover';
|
|
34
36
|
export * from './itemMarkerPopover/OldItemMarkerPopover';
|
|
35
37
|
export * from './legend';
|
|
36
38
|
export * from './legendChip/LegendChip';
|
|
@@ -55,6 +57,9 @@ export * from './secondaryMarker/SecondaryMarker';
|
|
|
55
57
|
export * from './secondaryMarker/SecondaryMarkerExpander';
|
|
56
58
|
export * from './secondaryMarker/SecondaryMarkerWithChip';
|
|
57
59
|
export * from './secondaryMarker/SecondaryMarkerWrapper';
|
|
60
|
+
export type { SelectionBarMenuState } from './selectionBar/menu/SelectionBarMenu';
|
|
61
|
+
export * from './selectionBar/SelectionBar';
|
|
62
|
+
export type { SelectionBarFeedbackType } from './selectionBar/selectionBarFeedback.types';
|
|
58
63
|
export * from './selectionColorPicker/SelectionColorPicker';
|
|
59
64
|
export * from './selectTextOnFocusAutocomplete/SelectTextOnFocusAutocomplete';
|
|
60
65
|
export * from './sidebarButton/SidebarButton';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ArrowPosition = 'left' | 'right' | 'top' | 'bottom' | 'none';
|
|
3
|
+
export interface ItemMarkerPopoverProps {
|
|
4
|
+
/**
|
|
5
|
+
* Children should be ItemMarkerPopover.Header, ItemMarkerPopover.Content, and/or ItemMarkerPopover.Footer
|
|
6
|
+
*/
|
|
7
|
+
readonly children: ReactNode;
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
readonly zIndex?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Position of the arrow pointer. Defaults to 'left' (arrow points left, popover opens to the right).
|
|
12
|
+
*/
|
|
13
|
+
readonly arrowPosition?: ArrowPosition;
|
|
14
|
+
}
|
|
15
|
+
export declare const ItemMarkerPopover: (({ children, className, zIndex, arrowPosition }: ItemMarkerPopoverProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
16
|
+
Header: ((props: import("./ItemMarkerPopoverHeader").ItemMarkerPopoverHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
17
|
+
Pagination: (props: import("./itemMarkerPopoverHeader/ItemMarkerPopoverHeaderPagination").ItemMarkerPopoverHeaderPaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
Title: (props: import("./itemMarkerPopoverHeader/ItemMarkerPopoverHeaderTitle").HeaderTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
};
|
|
20
|
+
Content: (props: import("./ItemMarkerPopoverContent").ItemMarkerPopoverContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
Footer: ({ children, className }: import("./ItemMarkerPopoverFooter").ItemMarkerPopoverFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ItemMarkerPopoverContentProps {
|
|
3
|
+
/**
|
|
4
|
+
* Main content (typically a card component)
|
|
5
|
+
*/
|
|
6
|
+
readonly children: ReactNode;
|
|
7
|
+
readonly className?: string;
|
|
8
|
+
readonly onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const Content: (props: ItemMarkerPopoverContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ItemMarkerPopoverFooterProps {
|
|
3
|
+
/**
|
|
4
|
+
* Footer content (typically SelectionBar)
|
|
5
|
+
*/
|
|
6
|
+
readonly children: ReactNode;
|
|
7
|
+
readonly className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Footer: ({ children, className }: ItemMarkerPopoverFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ItemMarkerPopoverHeaderProps {
|
|
3
|
+
readonly onClose: () => void;
|
|
4
|
+
/**
|
|
5
|
+
* Children: use Header.Pagination and Header.Title
|
|
6
|
+
*/
|
|
7
|
+
readonly children: ReactNode;
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @example
|
|
12
|
+
* <Header onClose={() => console.log('close popover')}>
|
|
13
|
+
* <Header.Pagination
|
|
14
|
+
* currentIndex={1}
|
|
15
|
+
* totalCount={5}
|
|
16
|
+
* onPrevious={() => console.log('previous item')}
|
|
17
|
+
* onNext={() => console.log('next item')}
|
|
18
|
+
* />
|
|
19
|
+
* <Header.Title>Item 1</Header.Title>
|
|
20
|
+
* </Header>
|
|
21
|
+
*/
|
|
22
|
+
export declare const Header: ((props: ItemMarkerPopoverHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
23
|
+
Pagination: (props: import("./itemMarkerPopoverHeader/ItemMarkerPopoverHeaderPagination").ItemMarkerPopoverHeaderPaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
Title: (props: import("./itemMarkerPopoverHeader/ItemMarkerPopoverHeaderTitle").HeaderTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
};
|
|
@@ -10,6 +10,8 @@ export type OldItemMarkerPopover = {
|
|
|
10
10
|
style?: CSSProperties;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
+
* /** @deprecated This component is being deprecated as a part of #419082 in favor of the new ItemMarkerPopover compound component which interacts well with ItemCard.
|
|
14
|
+
*
|
|
13
15
|
* Popover component that can display a single item, or a pagination of multiple items.
|
|
14
16
|
* NB:
|
|
15
17
|
* The content that is being passed in needs to be styled accordingly to the dark theme.
|
|
@@ -25,5 +27,3 @@ export type OldItemMarkerPopover = {
|
|
|
25
27
|
* @param {CSSProperties} style - style of the popover.
|
|
26
28
|
*/
|
|
27
29
|
export declare const OldItemMarkerPopover: ({ items, isOpen, handleClose, title, zIndex, className, style }: OldItemMarkerPopover) => false | import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
/** @deprecated This component is being deprecated as a part of #419082 in favor of the new ItemMarkerPopover compound component which interacts well with ItemCard. */
|
|
29
|
-
export declare const ItemMarkerPopover: ({ items, isOpen, handleClose, title, zIndex, className, style }: OldItemMarkerPopover) => false | import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ItemMarkerPopoverHeaderPaginationProps {
|
|
2
|
+
readonly currentIndex: number;
|
|
3
|
+
readonly totalCount: number;
|
|
4
|
+
readonly onPrevious: () => void;
|
|
5
|
+
readonly onNext: () => void;
|
|
6
|
+
readonly className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const ItemMarkerPopoverHeaderPagination: (props: ItemMarkerPopoverHeaderPaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,7 @@ export interface LegendSelectorProps {
|
|
|
4
4
|
options: ReadonlyArray<string>;
|
|
5
5
|
selectedOption: string;
|
|
6
6
|
onOptionClick: (option: string) => void;
|
|
7
|
-
legends: LegendChipProps
|
|
7
|
+
legends: ReadonlyArray<LegendChipProps>;
|
|
8
8
|
showLegendToggle?: boolean;
|
|
9
9
|
visual?: React.JSX.Element;
|
|
10
10
|
placeholder?: string;
|
|
@@ -6,4 +6,4 @@ import { LegendChipProps } from '../legendChip/LegendChip';
|
|
|
6
6
|
* @param {number} availableWidth - The available width for showing the legends, in px.
|
|
7
7
|
* @returns {LegendChipProps[]} - Array of visible legends.
|
|
8
8
|
*/
|
|
9
|
-
export declare const useVisibleLegends: (showAllLegends: boolean, legends: LegendChipProps
|
|
9
|
+
export declare const useVisibleLegends: (showAllLegends: boolean, legends: ReadonlyArray<LegendChipProps>, availableWidth: number) => ReadonlyArray<LegendChipProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface SelectionBarProps {
|
|
3
|
+
readonly children: ReactNode;
|
|
4
|
+
readonly className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const SelectionBar: (({ children, className }: SelectionBarProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
7
|
+
Content: ({ children, className }: import("./SelectionBarContent").SelectionBarContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Menu: ((props: import("./menu/SelectionBarMenu").SelectionBarMenuProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
9
|
+
MenuItem: (props: import("./menu/SelectionBarMenuItem").SelectionBarMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
Counter: (props: import("./SelectionBarCounter").SelectionBarCounterProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Feedback: ({ feedbackType, className }: import("./SelectionBarFeedback").SelectionBarFeedbackProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface SelectionBarContentProps {
|
|
3
|
+
readonly children: ReactNode;
|
|
4
|
+
readonly className?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Flexible content area within the SelectionBar.
|
|
8
|
+
* Put any components or elements here.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SelectionBarContent: ({ children, className }: SelectionBarContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface SelectionBarCounterProps {
|
|
2
|
+
/** Number of currently selected items */
|
|
3
|
+
readonly selectedItems: number;
|
|
4
|
+
/** Total number of items available */
|
|
5
|
+
readonly totalItems: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Displays a selection count in the format "selected / total".
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <SelectionBar.Counter selectedItems={2} totalItems={5} />
|
|
13
|
+
* // Renders: "2 / 5"
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const SelectionBarCounter: (props: SelectionBarCounterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SelectionBarFeedbackType } from './selectionBarFeedback.types';
|
|
2
|
+
export interface SelectionBarFeedbackProps {
|
|
3
|
+
/** The type of feedback to display */
|
|
4
|
+
readonly feedbackType: SelectionBarFeedbackType;
|
|
5
|
+
/** Optional additional CSS class */
|
|
6
|
+
readonly className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Displays feedback status within the SelectionBar (e.g., "Added", "Removed", "Failed to add").
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <SelectionBar.Feedback feedbackType="added" />
|
|
14
|
+
* // Renders: ✓ Added (in success color)
|
|
15
|
+
*
|
|
16
|
+
* <SelectionBar.Feedback feedbackType="addError" />
|
|
17
|
+
* // Renders: ⚠ Failed to add (in error color)
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare const SelectionBarFeedback: ({ feedbackType, className }: SelectionBarFeedbackProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type SelectionBarMenuState = 'unselected' | 'selected' | 'loading';
|
|
3
|
+
export interface SelectionBarMenuProps {
|
|
4
|
+
readonly children: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Unique ID for the menu
|
|
7
|
+
*/
|
|
8
|
+
readonly menuId?: string;
|
|
9
|
+
readonly className?: string;
|
|
10
|
+
readonly state?: SelectionBarMenuState;
|
|
11
|
+
/**
|
|
12
|
+
* This will overwrite the default onClick used for opening the menu.
|
|
13
|
+
* Useful for special case where we only have one list, and we want to
|
|
14
|
+
* auto-add to that without opening the menu.
|
|
15
|
+
*/
|
|
16
|
+
readonly overwriteMenuTriggerClick?: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Custom label for the button when state is 'unselected'. Defaults to 'Add to selection'.
|
|
19
|
+
*/
|
|
20
|
+
readonly unselectedLabel?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Custom label for the button when state is 'selected'. Defaults to 'Remove'.
|
|
23
|
+
*/
|
|
24
|
+
readonly selectedLabel?: string;
|
|
25
|
+
readonly 'data-testid'?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const SelectionBarMenu: ((props: SelectionBarMenuProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
28
|
+
MenuItem: (props: import("./SelectionBarMenuItem").SelectionBarMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type SelectionBarMenuItemVariant = 'add' | 'remove';
|
|
2
|
+
export interface SelectionBarMenuItemProps {
|
|
3
|
+
readonly children: string | string[];
|
|
4
|
+
readonly onClick: (event: React.MouseEvent<Element, MouseEvent>) => void;
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Determines the icon and styling of the menu item. Defaults to 'add'.
|
|
8
|
+
*/
|
|
9
|
+
readonly variant?: SelectionBarMenuItemVariant;
|
|
10
|
+
readonly hasBorderBottom?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to show the variant icon. Defaults to true.
|
|
13
|
+
*/
|
|
14
|
+
readonly showIcon?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the menu should close when this item is clicked. Defaults to true.
|
|
17
|
+
*/
|
|
18
|
+
readonly closeMenuOnClick?: boolean;
|
|
19
|
+
readonly 'data-testid'?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Menu item for use within SelectionBar.Menu
|
|
23
|
+
*/
|
|
24
|
+
export declare const SelectionBarMenuItem: (props: SelectionBarMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SelectionBarFeedbackType = 'added' | 'removed' | 'addError' | 'removeError' | 'colorChanged' | 'colorChangeError';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
interface SelectionColorProps {
|
|
2
|
+
readonly className?: string;
|
|
2
3
|
readonly itemColor?: string;
|
|
3
4
|
readonly colors: ReadonlyArray<string>;
|
|
4
5
|
readonly onColorSelect: (color: string) => void;
|
|
5
6
|
readonly disabled?: boolean;
|
|
6
7
|
readonly renderButtonAsSpan?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const SelectionColorPicker: ({ itemColor, colors, onColorSelect, disabled, renderButtonAsSpan }: SelectionColorProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const SelectionColorPicker: ({ itemColor, colors, onColorSelect, disabled, renderButtonAsSpan, className }: SelectionColorProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TooltipItem } from 'chart.js';
|
|
2
|
-
export declare const chartDataSet: {
|
|
3
|
-
labels: string[];
|
|
4
|
-
datasets: {
|
|
5
|
-
label: string;
|
|
6
|
-
data: number[];
|
|
7
|
-
borderColor: string;
|
|
8
|
-
pointBackgroundColor: string;
|
|
9
|
-
backgroundColor: string;
|
|
10
|
-
fill: boolean;
|
|
11
|
-
}[];
|
|
12
|
-
};
|
|
13
|
-
export declare const tooltip: {
|
|
14
|
-
callbacks: {
|
|
15
|
-
title: (tooltipItems: TooltipItem<"line">[]) => string | undefined;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const raw: {
|
|
2
|
-
DATA1: {
|
|
3
|
-
id: string;
|
|
4
|
-
value: number;
|
|
5
|
-
timestamp: string;
|
|
6
|
-
status: number;
|
|
7
|
-
}[];
|
|
8
|
-
DATA2: {
|
|
9
|
-
id: string;
|
|
10
|
-
value: number;
|
|
11
|
-
timestamp: string;
|
|
12
|
-
status: number;
|
|
13
|
-
}[];
|
|
14
|
-
DATA3: {
|
|
15
|
-
id: string;
|
|
16
|
-
value: number;
|
|
17
|
-
timestamp: string;
|
|
18
|
-
status: number;
|
|
19
|
-
}[];
|
|
20
|
-
DATA4: {
|
|
21
|
-
id: string;
|
|
22
|
-
value: number;
|
|
23
|
-
timestamp: string;
|
|
24
|
-
status: number;
|
|
25
|
-
}[];
|
|
26
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const echoUI: {
|
|
2
|
-
readonly bgFabResting: "rgba(0 0 0 / 0.8)";
|
|
3
|
-
readonly bgFabHover: "rgba(0 0 0 / 0.9)";
|
|
4
|
-
readonly bgLightenLighten_16: "rgba(255 255 255 / 0.16)";
|
|
5
|
-
readonly bgLightenLighten_10: "rgba(255 255 255 / 0.1)";
|
|
6
|
-
readonly bgLightenLighten_30: "rgba(255 255 255 / 0.3)";
|
|
7
|
-
readonly miscMarkerActive: "#00ffff";
|
|
8
|
-
};
|