@trackunit/react-components 1.4.178-alpha-5c343857aa0.0 → 1.4.178
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 +48 -0
- package/index.esm.js +48 -1
- package/package.json +7 -7
- package/src/components/index.d.ts +1 -0
package/index.cjs.js
CHANGED
|
@@ -2214,6 +2214,53 @@ const ExternalLink = ({ rel = "noreferrer", target = "_blank", href, className,
|
|
|
2214
2214
|
return (jsxRuntime.jsx("a", { className: cvaExternalLink({ className }), "data-testid": dataTestId, href: href, onClick: onClick, rel: rel, target: target, title: title, children: children }));
|
|
2215
2215
|
};
|
|
2216
2216
|
|
|
2217
|
+
const cvaHighlight = cssClassVarianceUtilities.cvaMerge([
|
|
2218
|
+
"inline-flex",
|
|
2219
|
+
"justify-center",
|
|
2220
|
+
"items-center",
|
|
2221
|
+
"rounded",
|
|
2222
|
+
"py-0.5",
|
|
2223
|
+
"px-1",
|
|
2224
|
+
"text-center",
|
|
2225
|
+
"h-min",
|
|
2226
|
+
"min-w-[1.5rem]",
|
|
2227
|
+
"font-medium",
|
|
2228
|
+
"truncate",
|
|
2229
|
+
"max-w-full",
|
|
2230
|
+
"w-fit",
|
|
2231
|
+
"text-xs",
|
|
2232
|
+
], {
|
|
2233
|
+
variants: {
|
|
2234
|
+
color: {
|
|
2235
|
+
primary: ["bg-primary-100", "text-primary-700"],
|
|
2236
|
+
success: ["bg-success-100", "text-success-700"],
|
|
2237
|
+
warning: ["bg-warning-100", "text-warning-700"],
|
|
2238
|
+
danger: ["bg-danger-100", "text-danger-700"],
|
|
2239
|
+
unknown: ["bg-unknown-100", "text-unknown-700"],
|
|
2240
|
+
},
|
|
2241
|
+
},
|
|
2242
|
+
defaultVariants: {
|
|
2243
|
+
color: "warning",
|
|
2244
|
+
},
|
|
2245
|
+
});
|
|
2246
|
+
const cvaHighlightText = cssClassVarianceUtilities.cvaMerge(["truncate"]);
|
|
2247
|
+
|
|
2248
|
+
/**
|
|
2249
|
+
* The Highlight component is used to draw attention to data values that may require user action, monitoring, or investigation.
|
|
2250
|
+
* It visually emphasizes out-of-range or critical values using color cues (e.g. danger or warning) to support quick scanning and awareness.
|
|
2251
|
+
*
|
|
2252
|
+
* How to choose between Highlight and Tag?
|
|
2253
|
+
* - Use Highlight to draw attention to values in plain text that require special attention or have crossed a threshold.
|
|
2254
|
+
* - Use a [Tag](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-tag--docs) for labeling statuses, categories, or selections.
|
|
2255
|
+
*
|
|
2256
|
+
* @param {HighlightProps} props - The props for the highlight component
|
|
2257
|
+
* @returns {ReactElement} highlight component
|
|
2258
|
+
*/
|
|
2259
|
+
const Highlight = ({ className, dataTestId, children, color = "warning", ref }) => {
|
|
2260
|
+
return (jsxRuntime.jsx("div", { className: cvaHighlight({ className, color }), "data-testid": dataTestId, ref: ref, children: jsxRuntime.jsx("span", { className: cvaHighlightText(), children: children }) }));
|
|
2261
|
+
};
|
|
2262
|
+
Highlight.displayName = "Highlight";
|
|
2263
|
+
|
|
2217
2264
|
const PADDING = 12;
|
|
2218
2265
|
/**
|
|
2219
2266
|
* Converts a width size value into a CSS dimension value for max constraints
|
|
@@ -4028,6 +4075,7 @@ exports.EmptyState = EmptyState;
|
|
|
4028
4075
|
exports.EmptyValue = EmptyValue;
|
|
4029
4076
|
exports.ExternalLink = ExternalLink;
|
|
4030
4077
|
exports.Heading = Heading;
|
|
4078
|
+
exports.Highlight = Highlight;
|
|
4031
4079
|
exports.Icon = Icon;
|
|
4032
4080
|
exports.IconButton = IconButton;
|
|
4033
4081
|
exports.Indicator = Indicator;
|
package/index.esm.js
CHANGED
|
@@ -2212,6 +2212,53 @@ const ExternalLink = ({ rel = "noreferrer", target = "_blank", href, className,
|
|
|
2212
2212
|
return (jsx("a", { className: cvaExternalLink({ className }), "data-testid": dataTestId, href: href, onClick: onClick, rel: rel, target: target, title: title, children: children }));
|
|
2213
2213
|
};
|
|
2214
2214
|
|
|
2215
|
+
const cvaHighlight = cvaMerge([
|
|
2216
|
+
"inline-flex",
|
|
2217
|
+
"justify-center",
|
|
2218
|
+
"items-center",
|
|
2219
|
+
"rounded",
|
|
2220
|
+
"py-0.5",
|
|
2221
|
+
"px-1",
|
|
2222
|
+
"text-center",
|
|
2223
|
+
"h-min",
|
|
2224
|
+
"min-w-[1.5rem]",
|
|
2225
|
+
"font-medium",
|
|
2226
|
+
"truncate",
|
|
2227
|
+
"max-w-full",
|
|
2228
|
+
"w-fit",
|
|
2229
|
+
"text-xs",
|
|
2230
|
+
], {
|
|
2231
|
+
variants: {
|
|
2232
|
+
color: {
|
|
2233
|
+
primary: ["bg-primary-100", "text-primary-700"],
|
|
2234
|
+
success: ["bg-success-100", "text-success-700"],
|
|
2235
|
+
warning: ["bg-warning-100", "text-warning-700"],
|
|
2236
|
+
danger: ["bg-danger-100", "text-danger-700"],
|
|
2237
|
+
unknown: ["bg-unknown-100", "text-unknown-700"],
|
|
2238
|
+
},
|
|
2239
|
+
},
|
|
2240
|
+
defaultVariants: {
|
|
2241
|
+
color: "warning",
|
|
2242
|
+
},
|
|
2243
|
+
});
|
|
2244
|
+
const cvaHighlightText = cvaMerge(["truncate"]);
|
|
2245
|
+
|
|
2246
|
+
/**
|
|
2247
|
+
* The Highlight component is used to draw attention to data values that may require user action, monitoring, or investigation.
|
|
2248
|
+
* It visually emphasizes out-of-range or critical values using color cues (e.g. danger or warning) to support quick scanning and awareness.
|
|
2249
|
+
*
|
|
2250
|
+
* How to choose between Highlight and Tag?
|
|
2251
|
+
* - Use Highlight to draw attention to values in plain text that require special attention or have crossed a threshold.
|
|
2252
|
+
* - Use a [Tag](https://apps.iris.trackunit.com/storybook/?path=/docs/react-components-tag--docs) for labeling statuses, categories, or selections.
|
|
2253
|
+
*
|
|
2254
|
+
* @param {HighlightProps} props - The props for the highlight component
|
|
2255
|
+
* @returns {ReactElement} highlight component
|
|
2256
|
+
*/
|
|
2257
|
+
const Highlight = ({ className, dataTestId, children, color = "warning", ref }) => {
|
|
2258
|
+
return (jsx("div", { className: cvaHighlight({ className, color }), "data-testid": dataTestId, ref: ref, children: jsx("span", { className: cvaHighlightText(), children: children }) }));
|
|
2259
|
+
};
|
|
2260
|
+
Highlight.displayName = "Highlight";
|
|
2261
|
+
|
|
2215
2262
|
const PADDING = 12;
|
|
2216
2263
|
/**
|
|
2217
2264
|
* Converts a width size value into a CSS dimension value for max constraints
|
|
@@ -4009,4 +4056,4 @@ const cvaClickable = cvaMerge([
|
|
|
4009
4056
|
},
|
|
4010
4057
|
});
|
|
4011
4058
|
|
|
4012
|
-
export { ActionRenderer, Alert, Badge, Breadcrumb, BreadcrumbContainer, Button, Card, CardBody, CardFooter, CardHeader, Collapse, CompletionStatusIndicator, CopyableText, EmptyState, EmptyValue, ExternalLink, Heading, Icon, IconButton, Indicator, KPI, KPICard, MenuDivider, MenuItem, MenuList, MoreMenu, Notice, PackageNameStoryComponent, Page, PageContent, PageHeader, PageHeaderKpiMetrics, PageHeaderSecondaryActions, PageHeaderTitle, Pagination, Polygon, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Portal, Prompt, ROLE_CARD, SectionHeader, Sidebar, SkeletonLines, Spacer, Spinner, StarButton, Tab, TabContent, TabList, Tabs, Tag, Text, ToggleGroup, ToggleItem, Tooltip, ValueBar, VirtualizedList, ZStack, cvaButton, cvaButtonPrefixSuffix, cvaButtonSpinner, cvaButtonSpinnerContainer, cvaClickable, cvaContainerStyles, cvaIconButton, cvaImgStyles, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaInteractableItem, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemStyle, cvaMenuItemSuffix, cvaPageHeader, cvaPageHeaderContainer, cvaPageHeaderHeading, cvaToggleGroup, cvaToggleItem, cvaToggleItemText, cvaVirtualizedList, cvaVirtualizedListContainer, cvaVirtualizedListItem, cvaZStackContainer, cvaZStackItem, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, useClickOutside, useContainerBreakpoints, useContinuousTimeout, useDebounce, useDevicePixelRatio, useElevatedReducer, useElevatedState, useGeometry, useHover, useIsFirstRender, useIsFullscreen, useIsTextTruncated, useModifierKey, useOverflowItems, usePopoverContext, usePrompt, useResize, useScrollDetection, useSelfUpdatingRef, useTimeout, useViewportBreakpoints, useWatch, useWindowActivity };
|
|
4059
|
+
export { ActionRenderer, Alert, Badge, Breadcrumb, BreadcrumbContainer, Button, Card, CardBody, CardFooter, CardHeader, Collapse, CompletionStatusIndicator, CopyableText, EmptyState, EmptyValue, ExternalLink, Heading, Highlight, Icon, IconButton, Indicator, KPI, KPICard, MenuDivider, MenuItem, MenuList, MoreMenu, Notice, PackageNameStoryComponent, Page, PageContent, PageHeader, PageHeaderKpiMetrics, PageHeaderSecondaryActions, PageHeaderTitle, Pagination, Polygon, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Portal, Prompt, ROLE_CARD, SectionHeader, Sidebar, SkeletonLines, Spacer, Spinner, StarButton, Tab, TabContent, TabList, Tabs, Tag, Text, ToggleGroup, ToggleItem, Tooltip, ValueBar, VirtualizedList, ZStack, cvaButton, cvaButtonPrefixSuffix, cvaButtonSpinner, cvaButtonSpinnerContainer, cvaClickable, cvaContainerStyles, cvaIconButton, cvaImgStyles, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaInteractableItem, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemStyle, cvaMenuItemSuffix, cvaPageHeader, cvaPageHeaderContainer, cvaPageHeaderHeading, cvaToggleGroup, cvaToggleItem, cvaToggleItemText, cvaVirtualizedList, cvaVirtualizedListContainer, cvaVirtualizedListItem, cvaZStackContainer, cvaZStackItem, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, useClickOutside, useContainerBreakpoints, useContinuousTimeout, useDebounce, useDevicePixelRatio, useElevatedReducer, useElevatedState, useGeometry, useHover, useIsFirstRender, useIsFullscreen, useIsTextTruncated, useModifierKey, useOverflowItems, usePopoverContext, usePrompt, useResize, useScrollDetection, useSelfUpdatingRef, useTimeout, useViewportBreakpoints, useWatch, useWindowActivity };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "1.4.178
|
|
3
|
+
"version": "1.4.178",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -18,12 +18,12 @@
|
|
|
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.
|
|
22
|
-
"@trackunit/css-class-variance-utilities": "1.3.
|
|
23
|
-
"@trackunit/shared-utils": "1.5.
|
|
24
|
-
"@trackunit/ui-icons": "1.3.
|
|
25
|
-
"@trackunit/react-table-pagination": "1.3.
|
|
26
|
-
"@trackunit/react-test-setup": "1.0.
|
|
21
|
+
"@trackunit/ui-design-tokens": "1.3.144",
|
|
22
|
+
"@trackunit/css-class-variance-utilities": "1.3.146",
|
|
23
|
+
"@trackunit/shared-utils": "1.5.146",
|
|
24
|
+
"@trackunit/ui-icons": "1.3.146",
|
|
25
|
+
"@trackunit/react-table-pagination": "1.3.146",
|
|
26
|
+
"@trackunit/react-test-setup": "1.0.36"
|
|
27
27
|
},
|
|
28
28
|
"module": "./index.esm.js",
|
|
29
29
|
"main": "./index.cjs.js",
|
|
@@ -11,6 +11,7 @@ export * from "./EmptyState/EmptyState.variants";
|
|
|
11
11
|
export * from "./EmptyValue/EmptyValue";
|
|
12
12
|
export * from "./ExternalLink/ExternalLink";
|
|
13
13
|
export * from "./Heading";
|
|
14
|
+
export * from "./Highlight/Highlight";
|
|
14
15
|
export * from "./Icon/Icon";
|
|
15
16
|
export * from "./Indicator";
|
|
16
17
|
export * from "./KPI/KPI";
|