@equinor/echo-components 0.11.17 → 0.11.18

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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@equinor/echo-components",
3
- "version": "0.11.17",
3
+ "version": "0.11.18",
4
4
  "dependencies": {
5
- "chart.js": "4.4.4",
6
- "react-datepicker": "4.25.0",
5
+ "chart.js": "4.4.6",
6
+ "react-datepicker": "7.5.0",
7
7
  "react-window": "1.8.10"
8
8
  },
9
9
  "peerDependencies": {
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import 'react-datepicker/dist/react-datepicker.css';
3
2
  import './reactDatePicker.css';
4
- 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';
3
+ type PopperPlacement = 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
5
4
  export interface DatePickerProps {
6
5
  id: string;
7
6
  value: Date | undefined | null;
@@ -3,7 +3,7 @@ import { LegendChipProps } from '../legendChip/legendChip';
3
3
  export interface LegendSelectorProps {
4
4
  options: string[];
5
5
  selectedOption: string;
6
- onOptionClick: () => void;
6
+ onOptionClick: (option: string) => void;
7
7
  legends: LegendChipProps[];
8
8
  showLegendToggle?: boolean;
9
9
  visual?: JSX.Element;
@@ -15,7 +15,7 @@ export interface LegendSelectorProps {
15
15
  * Note that this component is meant to be displayed on a darker background, and should be used with the LegendSelectorAccordion as display in the LegendSelector story in the storybook.
16
16
  * @param {JSX.Element[]} options - List of options to be displayed in the selection-selector.
17
17
  * @param {string} selectedOption - The selected option.
18
- * @param {() => void} onOptionsClick - Function that is called when another option is clicked.
18
+ * @param {(option: string) => void} onOptionsClick - Function that is called when another option is clicked.
19
19
  * @param {JSX.Element[]} legends - List of legend chip components to be displayed.
20
20
  * @param {boolean} showLegendToggle - Boolean to show the legend toggle button. Optional.
21
21
  * @param {JSX.Element} visual - Visual or icon to be displayed before the legend selector. Optional.
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  interface LegendSelectorMenuProps {
3
3
  options: string[];
4
4
  selectedOption: string;
5
- onOptionClick: (selectedItem: string) => void;
5
+ onOptionClick: (option: string) => void;
6
6
  placeholder?: string;
7
7
  disabled?: boolean;
8
8
  }
@@ -11,7 +11,7 @@ interface LegendSelectorMenuProps {
11
11
  * This component is part of the LegendSelector, but can be used on it's own when needed.
12
12
  * @param {JSX.Element[]} options- List of items to be displayed in the menu.
13
13
  * @param {string} selectedOption- The selected item.
14
- * @param {() => void} onOptionClick - Function that is called when another option is clicked.
14
+ * @param {(option: string) => void} onOptionClick - Function that is called when another option is clicked.
15
15
  * @param {string} placeholder - Placeholder text to be displayed when no item is selected. Optional.
16
16
  * @param {boolean} disabled - Boolean to disable the menu. Optional.
17
17
  * @returns {JSX.Element} - Legend selector menu component.