@equinor/echo-components 0.26.10 → 1.0.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/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@equinor/echo-components",
3
- "version": "0.26.10",
3
+ "version": "1.0.1",
4
4
  "dependencies": {
5
5
  "chart.js": "4.5.0",
6
- "react-datepicker": "8.4.0",
6
+ "react-datepicker": "8.7.0",
7
7
  "react-swipeable": "7.0.2",
8
8
  "react-window": "1.8.11"
9
9
  },
10
10
  "peerDependencies": {
11
- "@equinor/echo-utils": ">= 0.26.11 < 0.27.0",
11
+ "@equinor/echo-utils": ">= 1.1.1 < 2.0.0",
12
12
  "@equinor/eds-core-react": "0.43.0",
13
13
  "@equinor/eds-icons": "0.22.0",
14
14
  "@equinor/eds-tokens": "0.9.2",
@@ -1,3 +1,4 @@
1
+ import { TooltipItem } from 'chart.js';
1
2
  export declare const chartDataSet: {
2
3
  labels: string[];
3
4
  datasets: {
@@ -11,6 +12,6 @@ export declare const chartDataSet: {
11
12
  };
12
13
  export declare const tooltip: {
13
14
  callbacks: {
14
- title: (tooltipItems: [Chart.ChartTooltipItem]) => string | undefined;
15
+ title: (tooltipItems: TooltipItem<"line">[]) => string | undefined;
15
16
  };
16
17
  };
@@ -4,6 +4,7 @@ export interface LegendChipProps {
4
4
  backgroundColor: string;
5
5
  disabled?: boolean;
6
6
  onClick?: (isDisabled: boolean) => void;
7
+ showAsPlainLabel?: boolean;
7
8
  }
8
9
  /**
9
10
  * Legend chip component to display a legend status chip.
@@ -8,7 +8,6 @@ export interface LegendSelectorProps {
8
8
  showLegendToggle?: boolean;
9
9
  visual?: JSX.Element;
10
10
  placeholder?: string;
11
- disabled?: boolean;
12
11
  }
13
12
  /**
14
13
  * Legend selector component that will display the selected legend type and the statuses.
@@ -20,7 +19,6 @@ export interface LegendSelectorProps {
20
19
  * @param {boolean} showLegendToggle - Boolean to show the legend toggle button. Optional.
21
20
  * @param {JSX.Element} visual - Visual or icon to be displayed before the legend selector. Optional.
22
21
  * @param {string} placeholder - Placeholder text to be displayed when no selection is selected. Optional.
23
- * @param {boolean} disabled - Boolean to disable the legend selector. Optional.
24
22
  * @returns {JSX.Element} - Legend selector component.
25
23
  */
26
24
  export declare const LegendSelector: React.FC<LegendSelectorProps>;
@@ -4,7 +4,6 @@ interface LegendSelectorMenuProps {
4
4
  selectedOption: string;
5
5
  onOptionClick: (option: string) => void;
6
6
  placeholder?: string;
7
- disabled?: boolean;
8
7
  }
9
8
  /**
10
9
  * Legend selector component to choose which legend type to display.
@@ -13,7 +12,6 @@ interface LegendSelectorMenuProps {
13
12
  * @param {string} selectedOption- The selected item.
14
13
  * @param {(option: string) => void} onOptionClick - Function that is called when another option is clicked.
15
14
  * @param {string} placeholder - Placeholder text to be displayed when no item is selected. Optional.
16
- * @param {boolean} disabled - Boolean to disable the menu. Optional.
17
15
  * @returns {JSX.Element} - Legend selector menu component.
18
16
  */
19
17
  export declare const LegendSelectorMenu: React.FC<LegendSelectorMenuProps>;
@@ -1,3 +1,3 @@
1
1
  export * from './useEventListener';
2
- export * from './useIsMobile';
2
+ export * from './useMediaMatch';
3
3
  export * from './useKeyboardNavigation';
@@ -0,0 +1,7 @@
1
+ export type Breakpoints = 'xs' | 's' | 'md' | 'lg' | 'xl' | 'xxl';
2
+ /**
3
+ * Hook for using media-queries on Typescript. Try to solve it with css before using this one.
4
+ * @Param breakpoint - A preset of breakpoints
5
+ * @return boolean - If it matches the media-query.
6
+ **/
7
+ export declare const useMediaMatch: (breakpoint: Breakpoints) => boolean;
@@ -7,3 +7,4 @@ export declare const em_drawing_group: IconData;
7
7
  export declare const em_drawing_ungroup: IconData;
8
8
  export declare const em_drawing_new_group: IconData;
9
9
  export declare const em_drawing_move_group: IconData;
10
+ export declare const general_return: IconData;
@@ -10,7 +10,7 @@ interface UIPreferencesContextType {
10
10
  interface UIPreferencesProviderProps {
11
11
  children: ReactNode;
12
12
  mode: Mode;
13
- density: Density;
13
+ density?: Density;
14
14
  }
15
15
  /**
16
16
  * Adds a context provider for UI preferences, allowing components to access the current mode and density.
@@ -428,8 +428,6 @@ export declare const echoModes: {
428
428
  readonly defaultSelectioncolorsColorSelectioncolor10: "#7304ff";
429
429
  readonly defaultSelectioncolorsColorSelectioncolor11: "#ff0000";
430
430
  readonly defaultSelectioncolorsColorSelectioncolor12: "#ff006b";
431
- readonly defaultSelectioncolorsColorSelectioncolor13: "#000000";
432
- readonly defaultSelectioncolorsColorSelectioncolor14: "#ffffff";
433
431
  readonly defaultSelectioncolorsTextIconSelectioncolor1: "#000000";
434
432
  readonly defaultSelectioncolorsTextIconSelectioncolor2: "#000000";
435
433
  readonly defaultSelectioncolorsTextIconSelectioncolor3: "#000000";
@@ -442,6 +440,4 @@ export declare const echoModes: {
442
440
  readonly defaultSelectioncolorsTextIconSelectioncolor10: "#ffffff";
443
441
  readonly defaultSelectioncolorsTextIconSelectioncolor11: "#000000";
444
442
  readonly defaultSelectioncolorsTextIconSelectioncolor12: "#000000";
445
- readonly defaultSelectioncolorsTextIconSelectioncolor13: "#ffffff";
446
- readonly defaultSelectioncolorsTextIconSelectioncolor14: "#000000";
447
443
  };
@@ -68,6 +68,4 @@ export declare const echoPrimitives: {
68
68
  readonly seletionColorsSelectioncolor10: "#7304ff";
69
69
  readonly seletionColorsSelectioncolor11: "#ff0000";
70
70
  readonly seletionColorsSelectioncolor12: "#ff006b";
71
- readonly seletionColorsSelectioncolor13: "#000000";
72
- readonly seletionColorsSelectioncolor14: "#ffffff";
73
71
  };
@@ -1,11 +1,18 @@
1
1
  export declare const themeConst: {
2
2
  xSmall: string;
3
+ smallXSmall: string;
3
4
  small: string;
4
5
  smallMedium: string;
5
6
  medium: string;
6
7
  mediumLarge: string;
7
8
  large: string;
8
9
  xLarge: string;
10
+ breakpointXs: string;
11
+ breakpointS: string;
12
+ breakpointMd: string;
13
+ breakpointLg: string;
14
+ breakpointXl: string;
15
+ breakpointXxl: string;
9
16
  fontSizeXSmall: string;
10
17
  fontSizeSmall: string;
11
18
  fontSizeSmallMedium: string;
@@ -83,6 +90,7 @@ export declare const themeConst: {
83
90
  readonly pm20: string;
84
91
  lc: string;
85
92
  readonly lo: string;
93
+ readonly noValvePositionInSAP: string;
86
94
  onGoing: string;
87
95
  readonly done: string;
88
96
  asBuilt: string;
@@ -143,10 +151,15 @@ export declare const themeConst: {
143
151
  backgroundDark3: string;
144
152
  hoverDark: string;
145
153
  borderDark: string;
146
- focusDark: string;
147
154
  primaryTextForDarkBackground: string;
148
155
  secondaryTextForDarkBackground: string;
149
156
  primaryInteractionForDarkBackground: string;
150
157
  uiBackgroundSemiTransparent: string;
151
158
  textStaticIconsDarkSecondary: string;
159
+ edsDarkUiBackgroundLighten: string;
160
+ edsDarkTextStaticIconsPrimary: string;
161
+ edsDarkInteractivePrimaryHover: string;
162
+ edsDarkInteractiveDisabledFill: string;
163
+ edsDarkInteractiveDisabledText: string;
164
+ selectionIndicator: string;
152
165
  };
@@ -1,4 +0,0 @@
1
- /**
2
- * @deprecated use isMobileDevice from @equinor/echo-utils instead
3
- */
4
- export declare function useIsMobile(): boolean;