@equinor/echo-components 1.3.0 → 2.0.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"chart.js": "4.5.1",
|
|
6
6
|
"react-datepicker": "8.7.0",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"react-window": "1.8.11"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@equinor/echo-utils": ">=
|
|
12
|
-
"@equinor/eds-core-react": "0.
|
|
11
|
+
"@equinor/echo-utils": ">= 2.0.0 < 3.0.0",
|
|
12
|
+
"@equinor/eds-core-react": "0.49.0",
|
|
13
13
|
"@equinor/eds-icons": "0.22.0",
|
|
14
|
-
"@equinor/eds-tokens": "0.
|
|
14
|
+
"@equinor/eds-tokens": "0.10.0",
|
|
15
15
|
"classnames": "2.5.1",
|
|
16
16
|
"lodash": ">= 4.17.21 < 5",
|
|
17
17
|
"react": ">= 17.0.2",
|
package/src/helpers/index.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts an EDS tabs index value to a positive integer (zero included) in a typesafe way.
|
|
3
|
+
*
|
|
4
|
+
* Accepts either a string or a number as input. If the input is a string,
|
|
5
|
+
* attempts to parse it as a base-10 integer.
|
|
6
|
+
*
|
|
7
|
+
* Throws an error if the string cannot be converted to a valid positive integer (zero included).
|
|
8
|
+
*
|
|
9
|
+
* Need to use a trusted method to convert the index value received from EDS Tabs component, because of this change:
|
|
10
|
+
* https://github.com/equinor/design-system/pull/3972
|
|
11
|
+
*
|
|
12
|
+
* @param edsTabsIndex - The index value to convert, as a string or number.
|
|
13
|
+
* @returns The numeric representation of the index.
|
|
14
|
+
* @throws {Error} If the input string cannot be parsed as a positive integer.
|
|
15
|
+
*/
|
|
16
|
+
export declare function edsTabsIndexToNumber(edsTabsIndex: string | number): number;
|