@trackunit/criticality-indicator 1.3.24 → 1.3.29
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/index.esm.js +1 -1
- package/package.json +5 -4
- package/src/CriticalityIndicator.d.ts +3 -2
- package/src/useCriticality.d.ts +2 -1
package/index.cjs.js
CHANGED
@@ -109,7 +109,7 @@ const useCriticality = (state, size = "medium") => {
|
|
109
109
|
* Criticality indicator.
|
110
110
|
*
|
111
111
|
* @param props - Criticality indicator props.
|
112
|
-
* @returns {
|
112
|
+
* @returns {ReactElement | null} Criticality indicator.
|
113
113
|
*/
|
114
114
|
const CriticalityIndicator = (props) => {
|
115
115
|
const { criticalityIndicator } = useCriticality(props.state, props.size);
|
package/index.esm.js
CHANGED
@@ -107,7 +107,7 @@ const useCriticality = (state, size = "medium") => {
|
|
107
107
|
* Criticality indicator.
|
108
108
|
*
|
109
109
|
* @param props - Criticality indicator props.
|
110
|
-
* @returns {
|
110
|
+
* @returns {ReactElement | null} Criticality indicator.
|
111
111
|
*/
|
112
112
|
const CriticalityIndicator = (props) => {
|
113
113
|
const { criticalityIndicator } = useCriticality(props.state, props.size);
|
package/package.json
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"name": "@trackunit/criticality-indicator",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.29",
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"engines": {
|
7
7
|
"node": ">=20.x"
|
8
8
|
},
|
9
9
|
"dependencies": {
|
10
|
+
"react": "19.0.0",
|
10
11
|
"jest-fetch-mock": "^3.0.3",
|
11
|
-
"@trackunit/react-components": "1.4.
|
12
|
-
"@trackunit/i18n-library-translation": "1.3.
|
13
|
-
"@trackunit/ui-design-tokens": "1.3.
|
12
|
+
"@trackunit/react-components": "1.4.28",
|
13
|
+
"@trackunit/i18n-library-translation": "1.3.29",
|
14
|
+
"@trackunit/ui-design-tokens": "1.3.28"
|
14
15
|
},
|
15
16
|
"module": "./index.esm.js",
|
16
17
|
"main": "./index.cjs.js",
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { CommonProps, IndicatorProps } from "@trackunit/react-components";
|
2
|
+
import { ReactElement } from "react";
|
2
3
|
import { AssetCriticalityState } from "./types";
|
3
4
|
export interface CriticalityIndicatorProps extends Pick<IndicatorProps, "withBackground" | "withLabel" | "ping" | "size">, CommonProps {
|
4
5
|
state: AssetCriticalityState;
|
@@ -7,6 +8,6 @@ export interface CriticalityIndicatorProps extends Pick<IndicatorProps, "withBac
|
|
7
8
|
* Criticality indicator.
|
8
9
|
*
|
9
10
|
* @param props - Criticality indicator props.
|
10
|
-
* @returns {
|
11
|
+
* @returns {ReactElement | null} Criticality indicator.
|
11
12
|
*/
|
12
|
-
export declare const CriticalityIndicator: (props: CriticalityIndicatorProps) =>
|
13
|
+
export declare const CriticalityIndicator: (props: CriticalityIndicatorProps) => ReactElement | null;
|
package/src/useCriticality.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
import { CriticalityColors } from "@trackunit/ui-design-tokens";
|
2
|
+
import { ReactElement } from "react";
|
2
3
|
import { AssetCriticalityState } from "./types";
|
3
4
|
type UseCriticality = (state?: AssetCriticalityState, size?: "small" | "medium" | "large") => {
|
4
5
|
criticalityIndicator?: {
|
5
|
-
icon:
|
6
|
+
icon: ReactElement;
|
6
7
|
label: string;
|
7
8
|
color: CriticalityColors;
|
8
9
|
};
|