@equinor/echo-components 1.0.0 → 1.2.0
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 +2 -2
- package/src/components/echoBottomBar/EchoBottomBar.d.ts +6 -0
- package/src/components/legendSelector/LegendSelector.d.ts +0 -2
- package/src/components/legendSelectorMenu/LegendSelectorMenu.d.ts +0 -2
- package/src/components/sidebarButton/SidebarButton.d.ts +2 -1
- package/src/hooks/index.d.ts +1 -1
- package/src/hooks/useMediaMatch.d.ts +7 -0
- package/src/theme/themeConst.d.ts +14 -1
- package/style-reset.css +1 -1
- package/src/hooks/useIsMobile.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"chart.js": "4.5.0",
|
|
6
6
|
"react-datepicker": "8.7.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"react-window": "1.8.11"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@equinor/echo-utils": ">= 1.
|
|
11
|
+
"@equinor/echo-utils": ">= 1.2.0 < 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",
|
|
@@ -4,3 +4,9 @@ export interface EchoBottomBarProps {
|
|
|
4
4
|
style?: React.CSSProperties;
|
|
5
5
|
}
|
|
6
6
|
export declare const EchoBottomBar: React.FC<EchoBottomBarProps>;
|
|
7
|
+
/**
|
|
8
|
+
* Child for EchoBottomBar. An <li> with the needed style
|
|
9
|
+
**/
|
|
10
|
+
export declare const EchoBottomBarItem: ({ children }: {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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>;
|
|
@@ -33,6 +33,7 @@ export interface SidebarButtonProps {
|
|
|
33
33
|
* The icon to be displayed.
|
|
34
34
|
*/
|
|
35
35
|
children: React.ReactNode;
|
|
36
|
+
showIndicator?: boolean;
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
39
|
* The reusable button component that is used in the sidebars/bottom bar.
|
|
@@ -57,4 +58,4 @@ export interface SidebarButtonProps {
|
|
|
57
58
|
* }
|
|
58
59
|
* @return {*} {JSX.Element}
|
|
59
60
|
*/
|
|
60
|
-
export declare const SidebarButton: ({ text, active, onClick, count, buttonPosition, refValue, id, children }: SidebarButtonProps) => React.JSX.Element;
|
|
61
|
+
export declare const SidebarButton: ({ text, active, onClick, count, buttonPosition, refValue, id, children, showIndicator }: SidebarButtonProps) => React.JSX.Element;
|
package/src/hooks/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -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
|
};
|
package/style-reset.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
#root,body,html{height:100%;overflow:hidden;position:fixed;width:100%}::-webkit-scrollbar{height:10px;width:10px}::-webkit-scrollbar-track{background:var(--equiGray5);border-radius:5px}::-webkit-scrollbar-thumb{background:var(--equiGreen1);border-radius:5px}::-webkit-scrollbar-thumb:hover{background:var(--eds_interactive_primary__hover)}button,input{appearance:none;background:transparent;border:inherit;color:inherit;font:inherit;outline:0}input,input:after,input:before{-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:auto}
|
|
1
|
+
#root,body,html{height:100%;overflow:hidden;position:fixed;width:100%}::-webkit-scrollbar{height:10px;width:10px}::-webkit-scrollbar-track{background:var(--equiGray5);border-radius:5px}::-webkit-scrollbar-thumb{background:var(--equiGreen1);border-radius:5px}::-webkit-scrollbar-thumb:hover{background:var(--eds_interactive_primary__hover)}button,input{appearance:none;background:transparent;border:inherit;color:inherit;font:inherit;outline:0}input,input:after,input:before{-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:auto}
|