@trackunit/react-components 1.4.157 → 1.4.159
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 +43 -37
- package/index.esm.js +43 -37
- package/package.json +2 -2
- package/src/components/Badge/Badge.d.ts +7 -2
- package/src/components/Highlight/Highlight.d.ts +32 -0
- package/src/components/Highlight/Highlight.variants.d.ts +4 -0
- package/src/components/Icon/Icon.d.ts +10 -10
- package/src/components/Tag/Tag.d.ts +9 -8
package/index.cjs.js
CHANGED
|
@@ -41,12 +41,12 @@ const cvaIcon = cssClassVarianceUtilities.cvaMerge(["aspect-square", "inline-gri
|
|
|
41
41
|
good: "text-good-600",
|
|
42
42
|
low: "text-low-600",
|
|
43
43
|
critical: "text-critical-600",
|
|
44
|
-
working: "text-working-
|
|
44
|
+
working: "text-working-500",
|
|
45
45
|
idle: "text-idle-600",
|
|
46
46
|
moving: "text-moving-600",
|
|
47
47
|
active: "text-active-600",
|
|
48
|
-
stopped: "text-stopped-
|
|
49
|
-
unknown: "text-unknown-
|
|
48
|
+
stopped: "text-stopped-700",
|
|
49
|
+
unknown: "text-unknown-400",
|
|
50
50
|
default: "text-current",
|
|
51
51
|
black: "text-black",
|
|
52
52
|
white: "text-white",
|
|
@@ -203,24 +203,24 @@ const cvaTag = cssClassVarianceUtilities.cvaMerge([
|
|
|
203
203
|
default: "",
|
|
204
204
|
},
|
|
205
205
|
color: {
|
|
206
|
-
primary: "bg-primary-100 text-primary-700",
|
|
207
|
-
secondary: "bg-secondary-100 text-secondary-700",
|
|
208
|
-
neutral: "bg-neutral-100 text-neutral-700",
|
|
209
|
-
black: "bg-neutral-100 text-neutral-700",
|
|
210
|
-
white: "bg-white text-neutral-600",
|
|
211
|
-
info: "bg-info-100 text-info-700",
|
|
212
|
-
success: "bg-success-100 text-success-700",
|
|
213
|
-
warning: "bg-warning-100 text-warning-700",
|
|
214
|
-
danger: "bg-danger-100 text-danger-700",
|
|
215
|
-
good: "bg-good-100 text-good-700",
|
|
216
|
-
low: "bg-low-100 text-low-700",
|
|
217
|
-
critical: "bg-critical-100 text-critical-700",
|
|
218
|
-
working: "bg-working-100 text-working-700",
|
|
219
|
-
stopped: "bg-stopped-100 text-stopped-700",
|
|
220
|
-
idle: "bg-idle-100 text-idle-700",
|
|
221
|
-
unknown: "bg-unknown-100 text-unknown-700",
|
|
222
|
-
moving: "bg-neutral-100 text-neutral-700",
|
|
223
|
-
active: "bg-neutral-100 text-neutral-700",
|
|
206
|
+
primary: ["bg-primary-100", "text-primary-700"],
|
|
207
|
+
secondary: ["bg-secondary-100", "text-secondary-700"],
|
|
208
|
+
neutral: ["bg-neutral-100", "text-neutral-700"],
|
|
209
|
+
black: ["bg-neutral-100", "text-neutral-700"],
|
|
210
|
+
white: ["bg-white", "text-neutral-600"],
|
|
211
|
+
info: ["bg-info-100", "text-info-700"],
|
|
212
|
+
success: ["bg-success-100", "text-success-700"],
|
|
213
|
+
warning: ["bg-warning-100", "text-warning-700"],
|
|
214
|
+
danger: ["bg-danger-100", "text-danger-700"],
|
|
215
|
+
good: ["bg-good-100", "text-good-700"],
|
|
216
|
+
low: ["bg-low-100", "text-low-700"],
|
|
217
|
+
critical: ["bg-critical-100", "text-critical-700"],
|
|
218
|
+
working: ["bg-working-100", "text-working-700"],
|
|
219
|
+
stopped: ["bg-stopped-100", "text-stopped-700"],
|
|
220
|
+
idle: ["bg-idle-100", "text-idle-700"],
|
|
221
|
+
unknown: ["bg-unknown-100", "text-unknown-700"],
|
|
222
|
+
moving: ["bg-neutral-100", "text-neutral-700"],
|
|
223
|
+
active: ["bg-neutral-100", "text-neutral-700"],
|
|
224
224
|
},
|
|
225
225
|
border: {
|
|
226
226
|
none: "border-none",
|
|
@@ -238,16 +238,17 @@ const cvaTagIconContainer = cssClassVarianceUtilities.cvaMerge(["inline-flex", "
|
|
|
238
238
|
const cvaTagIcon = cssClassVarianceUtilities.cvaMerge(["cursor-pointer", "transition-opacity", "hover:opacity-70", "text-neutral-500"]);
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
241
|
+
* The Tag component is used for labeling or categorizing items in the UI.
|
|
242
|
+
* It's commonly used to indicate the status of an asset, mark a feature as Beta,
|
|
243
|
+
* or display selected options in multi-select inputs.
|
|
244
244
|
*
|
|
245
|
-
*
|
|
245
|
+
* How to choose between Tag, Badge and Highlight?
|
|
246
|
+
* - Use a Tag for labeling statuses, categories, or selections.
|
|
247
|
+
* - Use a [Badge](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-badge--docs) to indicate notifications or counts of applied elements, such as filters.
|
|
248
|
+
* - Use a [Highlight](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-highlight--docs) to draw attention to values in plain text that require special attention or have crossed a threshold.
|
|
246
249
|
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* @param {TagProps} props - The props for the tag component
|
|
250
|
-
* @returns {ReactElement} tag component
|
|
250
|
+
* @param {TagProps} props - The props for the Tag component.
|
|
251
|
+
* @returns {ReactElement} The rendered Tag component.
|
|
251
252
|
*/
|
|
252
253
|
const Tag = ({ className, dataTestId, children, size = "medium", onClose, color = "primary", disabled = false, ref, icon, }) => {
|
|
253
254
|
const isSupportedDismissColor = react.useMemo(() => {
|
|
@@ -887,8 +888,13 @@ const cvaBadge = cssClassVarianceUtilities.cvaMerge([
|
|
|
887
888
|
});
|
|
888
889
|
|
|
889
890
|
/**
|
|
890
|
-
* The Badge component is used to
|
|
891
|
-
|
|
891
|
+
* The Badge component is used to indicate notifications or counts of applied elements.
|
|
892
|
+
* It's typically used to display numbers on elements like filters, tabs, or buttons.
|
|
893
|
+
*
|
|
894
|
+
* How to choose between Badge and Tag?
|
|
895
|
+
* - Use a Badge to indicate notifications or counts of applied elements.
|
|
896
|
+
* - Use a [Tag](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-tag--docs) for labeling statuses, categories, or selections.
|
|
897
|
+
*
|
|
892
898
|
* @param {BadgeProps} props - The props for the Badge component
|
|
893
899
|
* @returns {ReactElement} Badge component
|
|
894
900
|
*/
|
|
@@ -2662,12 +2668,12 @@ const cvaIndicatorPing = cssClassVarianceUtilities.cvaMerge(["animate-ping-sm",
|
|
|
2662
2668
|
good: "bg-good-600",
|
|
2663
2669
|
low: "bg-low-600",
|
|
2664
2670
|
critical: "bg-critical-600",
|
|
2665
|
-
working: "bg-working-
|
|
2671
|
+
working: "bg-working-500",
|
|
2666
2672
|
idle: "bg-idle-600",
|
|
2667
|
-
stopped: "bg-stopped-
|
|
2673
|
+
stopped: "bg-stopped-700",
|
|
2668
2674
|
moving: "bg-moving-600",
|
|
2669
2675
|
active: "bg-active-600",
|
|
2670
|
-
unknown: "bg-unknown-
|
|
2676
|
+
unknown: "bg-unknown-400",
|
|
2671
2677
|
unused: "bg-unused-400",
|
|
2672
2678
|
utilized: "bg-utilized-600",
|
|
2673
2679
|
heavily_utilized: "bg-heavily_utilized-500",
|
|
@@ -2704,12 +2710,12 @@ const cvaIndicatorIconBackground = cssClassVarianceUtilities.cvaMerge(["rounded-
|
|
|
2704
2710
|
good: "bg-good-100 text-good-600",
|
|
2705
2711
|
low: "bg-low-100 text-low-500",
|
|
2706
2712
|
critical: "bg-critical-100 text-critical-600",
|
|
2707
|
-
working: "bg-working-
|
|
2713
|
+
working: "bg-working-50 text-working-500",
|
|
2708
2714
|
idle: "bg-idle-100 text-idle-500",
|
|
2709
|
-
stopped: "bg-stopped-100 text-stopped-
|
|
2715
|
+
stopped: "bg-stopped-100 text-stopped-700",
|
|
2710
2716
|
moving: "text-moving-600 bg-neutral-100",
|
|
2711
2717
|
active: "text-active-600 bg-neutral-100",
|
|
2712
|
-
unknown: "bg-unknown-
|
|
2718
|
+
unknown: "bg-unknown-50 text-unknown-400",
|
|
2713
2719
|
unused: "bg-unused-300 text-unused-400",
|
|
2714
2720
|
utilized: "bg-utilized-400 text-utilized-600",
|
|
2715
2721
|
heavily_utilized: "bg-heavily_utilized-300 text-heavily_utilized-500",
|
package/index.esm.js
CHANGED
|
@@ -39,12 +39,12 @@ const cvaIcon = cvaMerge(["aspect-square", "inline-grid", "relative"], {
|
|
|
39
39
|
good: "text-good-600",
|
|
40
40
|
low: "text-low-600",
|
|
41
41
|
critical: "text-critical-600",
|
|
42
|
-
working: "text-working-
|
|
42
|
+
working: "text-working-500",
|
|
43
43
|
idle: "text-idle-600",
|
|
44
44
|
moving: "text-moving-600",
|
|
45
45
|
active: "text-active-600",
|
|
46
|
-
stopped: "text-stopped-
|
|
47
|
-
unknown: "text-unknown-
|
|
46
|
+
stopped: "text-stopped-700",
|
|
47
|
+
unknown: "text-unknown-400",
|
|
48
48
|
default: "text-current",
|
|
49
49
|
black: "text-black",
|
|
50
50
|
white: "text-white",
|
|
@@ -201,24 +201,24 @@ const cvaTag = cvaMerge([
|
|
|
201
201
|
default: "",
|
|
202
202
|
},
|
|
203
203
|
color: {
|
|
204
|
-
primary: "bg-primary-100 text-primary-700",
|
|
205
|
-
secondary: "bg-secondary-100 text-secondary-700",
|
|
206
|
-
neutral: "bg-neutral-100 text-neutral-700",
|
|
207
|
-
black: "bg-neutral-100 text-neutral-700",
|
|
208
|
-
white: "bg-white text-neutral-600",
|
|
209
|
-
info: "bg-info-100 text-info-700",
|
|
210
|
-
success: "bg-success-100 text-success-700",
|
|
211
|
-
warning: "bg-warning-100 text-warning-700",
|
|
212
|
-
danger: "bg-danger-100 text-danger-700",
|
|
213
|
-
good: "bg-good-100 text-good-700",
|
|
214
|
-
low: "bg-low-100 text-low-700",
|
|
215
|
-
critical: "bg-critical-100 text-critical-700",
|
|
216
|
-
working: "bg-working-100 text-working-700",
|
|
217
|
-
stopped: "bg-stopped-100 text-stopped-700",
|
|
218
|
-
idle: "bg-idle-100 text-idle-700",
|
|
219
|
-
unknown: "bg-unknown-100 text-unknown-700",
|
|
220
|
-
moving: "bg-neutral-100 text-neutral-700",
|
|
221
|
-
active: "bg-neutral-100 text-neutral-700",
|
|
204
|
+
primary: ["bg-primary-100", "text-primary-700"],
|
|
205
|
+
secondary: ["bg-secondary-100", "text-secondary-700"],
|
|
206
|
+
neutral: ["bg-neutral-100", "text-neutral-700"],
|
|
207
|
+
black: ["bg-neutral-100", "text-neutral-700"],
|
|
208
|
+
white: ["bg-white", "text-neutral-600"],
|
|
209
|
+
info: ["bg-info-100", "text-info-700"],
|
|
210
|
+
success: ["bg-success-100", "text-success-700"],
|
|
211
|
+
warning: ["bg-warning-100", "text-warning-700"],
|
|
212
|
+
danger: ["bg-danger-100", "text-danger-700"],
|
|
213
|
+
good: ["bg-good-100", "text-good-700"],
|
|
214
|
+
low: ["bg-low-100", "text-low-700"],
|
|
215
|
+
critical: ["bg-critical-100", "text-critical-700"],
|
|
216
|
+
working: ["bg-working-100", "text-working-700"],
|
|
217
|
+
stopped: ["bg-stopped-100", "text-stopped-700"],
|
|
218
|
+
idle: ["bg-idle-100", "text-idle-700"],
|
|
219
|
+
unknown: ["bg-unknown-100", "text-unknown-700"],
|
|
220
|
+
moving: ["bg-neutral-100", "text-neutral-700"],
|
|
221
|
+
active: ["bg-neutral-100", "text-neutral-700"],
|
|
222
222
|
},
|
|
223
223
|
border: {
|
|
224
224
|
none: "border-none",
|
|
@@ -236,16 +236,17 @@ const cvaTagIconContainer = cvaMerge(["inline-flex", "self-center"]);
|
|
|
236
236
|
const cvaTagIcon = cvaMerge(["cursor-pointer", "transition-opacity", "hover:opacity-70", "text-neutral-500"]);
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
239
|
+
* The Tag component is used for labeling or categorizing items in the UI.
|
|
240
|
+
* It's commonly used to indicate the status of an asset, mark a feature as Beta,
|
|
241
|
+
* or display selected options in multi-select inputs.
|
|
242
242
|
*
|
|
243
|
-
*
|
|
243
|
+
* How to choose between Tag, Badge and Highlight?
|
|
244
|
+
* - Use a Tag for labeling statuses, categories, or selections.
|
|
245
|
+
* - Use a [Badge](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-badge--docs) to indicate notifications or counts of applied elements, such as filters.
|
|
246
|
+
* - Use a [Highlight](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-highlight--docs) to draw attention to values in plain text that require special attention or have crossed a threshold.
|
|
244
247
|
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
* @param {TagProps} props - The props for the tag component
|
|
248
|
-
* @returns {ReactElement} tag component
|
|
248
|
+
* @param {TagProps} props - The props for the Tag component.
|
|
249
|
+
* @returns {ReactElement} The rendered Tag component.
|
|
249
250
|
*/
|
|
250
251
|
const Tag = ({ className, dataTestId, children, size = "medium", onClose, color = "primary", disabled = false, ref, icon, }) => {
|
|
251
252
|
const isSupportedDismissColor = useMemo(() => {
|
|
@@ -885,8 +886,13 @@ const cvaBadge = cvaMerge([
|
|
|
885
886
|
});
|
|
886
887
|
|
|
887
888
|
/**
|
|
888
|
-
* The Badge component is used to
|
|
889
|
-
|
|
889
|
+
* The Badge component is used to indicate notifications or counts of applied elements.
|
|
890
|
+
* It's typically used to display numbers on elements like filters, tabs, or buttons.
|
|
891
|
+
*
|
|
892
|
+
* How to choose between Badge and Tag?
|
|
893
|
+
* - Use a Badge to indicate notifications or counts of applied elements.
|
|
894
|
+
* - Use a [Tag](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-tag--docs) for labeling statuses, categories, or selections.
|
|
895
|
+
*
|
|
890
896
|
* @param {BadgeProps} props - The props for the Badge component
|
|
891
897
|
* @returns {ReactElement} Badge component
|
|
892
898
|
*/
|
|
@@ -2660,12 +2666,12 @@ const cvaIndicatorPing = cvaMerge(["animate-ping-sm", "absolute", "inline-flex",
|
|
|
2660
2666
|
good: "bg-good-600",
|
|
2661
2667
|
low: "bg-low-600",
|
|
2662
2668
|
critical: "bg-critical-600",
|
|
2663
|
-
working: "bg-working-
|
|
2669
|
+
working: "bg-working-500",
|
|
2664
2670
|
idle: "bg-idle-600",
|
|
2665
|
-
stopped: "bg-stopped-
|
|
2671
|
+
stopped: "bg-stopped-700",
|
|
2666
2672
|
moving: "bg-moving-600",
|
|
2667
2673
|
active: "bg-active-600",
|
|
2668
|
-
unknown: "bg-unknown-
|
|
2674
|
+
unknown: "bg-unknown-400",
|
|
2669
2675
|
unused: "bg-unused-400",
|
|
2670
2676
|
utilized: "bg-utilized-600",
|
|
2671
2677
|
heavily_utilized: "bg-heavily_utilized-500",
|
|
@@ -2702,12 +2708,12 @@ const cvaIndicatorIconBackground = cvaMerge(["rounded-full", "items-center", "ju
|
|
|
2702
2708
|
good: "bg-good-100 text-good-600",
|
|
2703
2709
|
low: "bg-low-100 text-low-500",
|
|
2704
2710
|
critical: "bg-critical-100 text-critical-600",
|
|
2705
|
-
working: "bg-working-
|
|
2711
|
+
working: "bg-working-50 text-working-500",
|
|
2706
2712
|
idle: "bg-idle-100 text-idle-500",
|
|
2707
|
-
stopped: "bg-stopped-100 text-stopped-
|
|
2713
|
+
stopped: "bg-stopped-100 text-stopped-700",
|
|
2708
2714
|
moving: "text-moving-600 bg-neutral-100",
|
|
2709
2715
|
active: "text-active-600 bg-neutral-100",
|
|
2710
|
-
unknown: "bg-unknown-
|
|
2716
|
+
unknown: "bg-unknown-50 text-unknown-400",
|
|
2711
2717
|
unused: "bg-unused-300 text-unused-400",
|
|
2712
2718
|
utilized: "bg-utilized-400 text-utilized-600",
|
|
2713
2719
|
heavily_utilized: "bg-heavily_utilized-300 text-heavily_utilized-500",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.159",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@tanstack/react-router": "1.114.29",
|
|
19
19
|
"string-ts": "^2.0.0",
|
|
20
20
|
"tailwind-merge": "^2.0.0",
|
|
21
|
-
"@trackunit/ui-design-tokens": "1.3.
|
|
21
|
+
"@trackunit/ui-design-tokens": "1.3.129",
|
|
22
22
|
"@trackunit/css-class-variance-utilities": "1.3.129",
|
|
23
23
|
"@trackunit/shared-utils": "1.5.129",
|
|
24
24
|
"@trackunit/ui-icons": "1.3.131",
|
|
@@ -32,8 +32,13 @@ interface BaseBadgeProps extends CommonProps {
|
|
|
32
32
|
}
|
|
33
33
|
export type BadgeProps = BaseBadgeProps;
|
|
34
34
|
/**
|
|
35
|
-
* The Badge component is used to
|
|
36
|
-
|
|
35
|
+
* The Badge component is used to indicate notifications or counts of applied elements.
|
|
36
|
+
* It's typically used to display numbers on elements like filters, tabs, or buttons.
|
|
37
|
+
*
|
|
38
|
+
* How to choose between Badge and Tag?
|
|
39
|
+
* - Use a Badge to indicate notifications or counts of applied elements.
|
|
40
|
+
* - Use a [Tag](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-tag--docs) for labeling statuses, categories, or selections.
|
|
41
|
+
*
|
|
37
42
|
* @param {BadgeProps} props - The props for the Badge component
|
|
38
43
|
* @returns {ReactElement} Badge component
|
|
39
44
|
*/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactNode, Ref } from "react";
|
|
2
|
+
import { CommonProps, Size } from "../../common";
|
|
3
|
+
export type HighlightSize = Extract<Size, "small" | "medium">;
|
|
4
|
+
export interface HighlightProps extends CommonProps {
|
|
5
|
+
/**
|
|
6
|
+
* The color of the highlight. Allowed values: "primary", "success", "warning", "danger", "unknown".
|
|
7
|
+
*/
|
|
8
|
+
color?: "primary" | "success" | "warning" | "danger" | "unknown";
|
|
9
|
+
/**
|
|
10
|
+
* The content of the highlight. Accepts any valid React children (text, numbers, elements).
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* A ref for the component
|
|
15
|
+
*/
|
|
16
|
+
ref?: Ref<HTMLDivElement>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The Highlight component is used to draw attention to data values that may require user action, monitoring, or investigation.
|
|
20
|
+
* It visually emphasizes out-of-range or critical values using color cues (e.g. danger or warning) to support quick scanning and awareness.
|
|
21
|
+
*
|
|
22
|
+
* How to choose between Highlight and Tag?
|
|
23
|
+
* - Use Highlight to draw attention to values in plain text that require special attention or have crossed a threshold.
|
|
24
|
+
* - Use a [Tag](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-tag--docs) for labeling statuses, categories, or selections.
|
|
25
|
+
*
|
|
26
|
+
* @param {HighlightProps} props - The props for the highlight component
|
|
27
|
+
* @returns {ReactElement} highlight component
|
|
28
|
+
*/
|
|
29
|
+
export declare const Highlight: {
|
|
30
|
+
({ className, dataTestId, children, color, ref }: HighlightProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const cvaHighlight: (props?: ({
|
|
2
|
+
color?: "primary" | "success" | "warning" | "danger" | "unknown" | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
4
|
+
export declare const cvaHighlightText: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
@@ -246,16 +246,16 @@ export declare const iconPalette: {
|
|
|
246
246
|
readonly 900: "120 53 15";
|
|
247
247
|
};
|
|
248
248
|
STOPPED: {
|
|
249
|
-
readonly 50: "
|
|
250
|
-
readonly 100: "
|
|
251
|
-
readonly 200: "
|
|
252
|
-
readonly 300: "
|
|
253
|
-
readonly 400: "
|
|
254
|
-
readonly 500: "
|
|
255
|
-
readonly 600: "
|
|
256
|
-
readonly 700: "
|
|
257
|
-
readonly 800: "
|
|
258
|
-
readonly 900: "
|
|
249
|
+
readonly 50: "249 250 251";
|
|
250
|
+
readonly 100: "243 244 246";
|
|
251
|
+
readonly 200: "229 231 235";
|
|
252
|
+
readonly 300: "209 213 219";
|
|
253
|
+
readonly 400: "156 163 175";
|
|
254
|
+
readonly 500: "107 114 128";
|
|
255
|
+
readonly 600: "75 85 99";
|
|
256
|
+
readonly 700: "55 65 81";
|
|
257
|
+
readonly 800: "31 41 55";
|
|
258
|
+
readonly 900: "17 24 39";
|
|
259
259
|
};
|
|
260
260
|
UNKNOWN: {
|
|
261
261
|
readonly 50: "249 250 251";
|
|
@@ -39,16 +39,17 @@ export interface TagProps extends CommonProps {
|
|
|
39
39
|
icon?: ReactNode;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* The Tag component is used for labeling or categorizing items in the UI.
|
|
43
|
+
* It's commonly used to indicate the status of an asset, mark a feature as Beta,
|
|
44
|
+
* or display selected options in multi-select inputs.
|
|
43
45
|
*
|
|
44
|
-
*
|
|
46
|
+
* How to choose between Tag, Badge and Highlight?
|
|
47
|
+
* - Use a Tag for labeling statuses, categories, or selections.
|
|
48
|
+
* - Use a [Badge](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-badge--docs) to indicate notifications or counts of applied elements, such as filters.
|
|
49
|
+
* - Use a [Highlight](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-highlight--docs) to draw attention to values in plain text that require special attention or have crossed a threshold.
|
|
45
50
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* **Do:** Use short labels for easy scanning.
|
|
49
|
-
*
|
|
50
|
-
* @param {TagProps} props - The props for the tag component
|
|
51
|
-
* @returns {ReactElement} tag component
|
|
51
|
+
* @param {TagProps} props - The props for the Tag component.
|
|
52
|
+
* @returns {ReactElement} The rendered Tag component.
|
|
52
53
|
*/
|
|
53
54
|
export declare const Tag: {
|
|
54
55
|
({ className, dataTestId, children, size, onClose, color, disabled, ref, icon, }: TagProps): import("react/jsx-runtime").JSX.Element;
|