@trackunit/react-components 1.17.16 → 1.17.20

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.
Files changed (60) hide show
  1. package/index.cjs.js +182 -170
  2. package/index.esm.js +183 -171
  3. package/package.json +5 -5
  4. package/src/common/Refable.d.ts +5 -0
  5. package/src/components/Alert/Alert.d.ts +3 -2
  6. package/src/components/Badge/Badge.d.ts +3 -2
  7. package/src/components/Breadcrumb/Breadcrumb.d.ts +1 -1
  8. package/src/components/Breadcrumb/utils/types.d.ts +2 -1
  9. package/src/components/Card/Card.d.ts +7 -3
  10. package/src/components/Card/CardBody.d.ts +3 -2
  11. package/src/components/Card/CardFooter.d.ts +3 -2
  12. package/src/components/Card/CardHeader.d.ts +3 -2
  13. package/src/components/Collapse/Collapse.d.ts +3 -2
  14. package/src/components/CopyableText/CopyableText.d.ts +3 -2
  15. package/src/components/DetailsList/DetailsList.d.ts +4 -2
  16. package/src/components/EmptyState/EmptyState.d.ts +2 -1
  17. package/src/components/EmptyValue/EmptyValue.d.ts +2 -1
  18. package/src/components/ExternalLink/ExternalLink.d.ts +3 -2
  19. package/src/components/Heading/Heading.d.ts +3 -2
  20. package/src/components/HorizontalOverflowScroller/HorizontalOverflowScroller.d.ts +4 -2
  21. package/src/components/Icon/Icon.d.ts +4 -9
  22. package/src/components/Indicator/Indicator.d.ts +3 -2
  23. package/src/components/KPI/KPI.d.ts +3 -2
  24. package/src/components/KPI/KPISkeleton.d.ts +3 -2
  25. package/src/components/KPICard/KPICard.d.ts +3 -2
  26. package/src/components/KPICard/KPICardSkeleton.d.ts +3 -2
  27. package/src/components/KPICard/components/TrendIndicator/TrendIndicator.d.ts +3 -2
  28. package/src/components/KPICard/components/TrendIndicators.d.ts +3 -2
  29. package/src/components/Menu/MenuItem/MenuItem.d.ts +3 -2
  30. package/src/components/Menu/MenuList/MenuList.d.ts +3 -2
  31. package/src/components/Menu/MoreMenu/MoreMenu.d.ts +3 -2
  32. package/src/components/Notice/Notice.d.ts +3 -2
  33. package/src/components/Page/Page.d.ts +3 -2
  34. package/src/components/Page/PageContent.d.ts +3 -2
  35. package/src/components/PageHeader/PageHeader.d.ts +1 -1
  36. package/src/components/PageHeader/components/PageHeaderKpiMetrics.d.ts +4 -2
  37. package/src/components/PageHeader/components/PageHeaderTitle.d.ts +4 -2
  38. package/src/components/PageHeader/types.d.ts +2 -1
  39. package/src/components/Pagination/Pagination.d.ts +3 -2
  40. package/src/components/Polygon/Polygon.d.ts +3 -2
  41. package/src/components/Popover/PopoverTitle.d.ts +3 -2
  42. package/src/components/PreferenceCard/PreferenceCard.d.ts +3 -2
  43. package/src/components/PreferenceCard/PreferenceCardSkeleton.d.ts +3 -2
  44. package/src/components/SectionHeader/SectionHeader.d.ts +3 -2
  45. package/src/components/Sidebar/Sidebar.d.ts +3 -2
  46. package/src/components/Skeleton/SkeletonBlock/SkeletonBlock.d.ts +2 -1
  47. package/src/components/Skeleton/SkeletonLabel/SkeletonLabel.d.ts +2 -1
  48. package/src/components/SkeletonLines/SkeletonLines.d.ts +4 -3
  49. package/src/components/Spacer/Spacer.d.ts +3 -2
  50. package/src/components/Spinner/Spinner.d.ts +3 -2
  51. package/src/components/Tabs/Tab.d.ts +3 -2
  52. package/src/components/Tabs/TabContent.d.ts +3 -2
  53. package/src/components/Tabs/TabList.d.ts +3 -2
  54. package/src/components/Tabs/Tabs.d.ts +3 -2
  55. package/src/components/ToggleGroup/ToggleGroup.d.ts +3 -2
  56. package/src/components/Tooltip/Tooltip.d.ts +1 -1
  57. package/src/components/ValueBar/ValueBar.d.ts +3 -2
  58. package/src/components/ZStack/ZStack.d.ts +3 -2
  59. package/src/components/buttons/StarButton/StarButton.d.ts +3 -2
  60. package/src/index.d.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "1.17.16",
3
+ "version": "1.17.20",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -14,10 +14,10 @@
14
14
  "@floating-ui/react": "^0.26.25",
15
15
  "string-ts": "^2.0.0",
16
16
  "tailwind-merge": "^2.0.0",
17
- "@trackunit/ui-design-tokens": "1.11.42",
18
- "@trackunit/css-class-variance-utilities": "1.11.42",
19
- "@trackunit/shared-utils": "1.13.42",
20
- "@trackunit/ui-icons": "1.11.41",
17
+ "@trackunit/ui-design-tokens": "1.11.43",
18
+ "@trackunit/css-class-variance-utilities": "1.11.43",
19
+ "@trackunit/shared-utils": "1.13.43",
20
+ "@trackunit/ui-icons": "1.11.42",
21
21
  "@tanstack/react-router": "1.114.29",
22
22
  "es-toolkit": "^1.39.10",
23
23
  "@tanstack/react-virtual": "3.13.12",
@@ -0,0 +1,5 @@
1
+ import { Ref } from "react";
2
+ export interface Refable<TElement extends Element = HTMLElement> {
3
+ /** Ref forwarded to the root DOM element */
4
+ ref?: Ref<TElement>;
5
+ }
@@ -1,5 +1,6 @@
1
1
  import { MouseEventHandler, ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
+ import { Refable } from "../../common/Refable";
3
4
  export type AlertColors = "info" | "success" | "warning" | "danger" | "neutral";
4
5
  export type AlertActionType = "primary" | "secondary";
5
6
  export type AlertAction = {
@@ -7,7 +8,7 @@ export type AlertAction = {
7
8
  onClick: MouseEventHandler<HTMLButtonElement>;
8
9
  loading?: boolean;
9
10
  };
10
- export interface AlertProps extends CommonProps {
11
+ export interface AlertProps extends CommonProps, Refable<HTMLDivElement> {
11
12
  /**
12
13
  * Child nodes.
13
14
  */
@@ -108,4 +109,4 @@ export interface AlertProps extends CommonProps {
108
109
  * @param {AlertProps} props - The props for the Alert component
109
110
  * @returns {ReactElement} Alert component
110
111
  */
111
- export declare const Alert: ({ color, title, className, children, primaryAction, secondaryAction, onClickClose, "data-testid": dataTestId, autoScroll, actionsInline, }: AlertProps) => ReactElement;
112
+ export declare const Alert: ({ color, title, className, children, primaryAction, secondaryAction, onClickClose, "data-testid": dataTestId, autoScroll, actionsInline, ref, }: AlertProps) => ReactElement;
@@ -1,9 +1,10 @@
1
1
  import { ThemeColors } from "@trackunit/ui-design-tokens";
2
2
  import { ReactElement } from "react";
3
3
  import { CommonProps } from "../../common/CommonProps";
4
+ import { Refable } from "../../common/Refable";
4
5
  type BadgeColors = Extract<ThemeColors, "primary" | "danger" | "warning" | "neutral">;
5
6
  type BadgeSize = "default" | "condensed";
6
- interface BaseBadgeProps extends CommonProps {
7
+ interface BaseBadgeProps extends CommonProps, Refable<HTMLSpanElement> {
7
8
  /**
8
9
  * The color of the badge.
9
10
  */
@@ -69,5 +70,5 @@ export type BadgeProps = BaseBadgeProps;
69
70
  * @param {BadgeProps} props - The props for the Badge component
70
71
  * @returns {ReactElement} Badge component
71
72
  */
72
- export declare const Badge: ({ color, size, compact, className, count, max, hideZero, "data-testid": dataTestId, }: BadgeProps) => ReactElement | null;
73
+ export declare const Badge: ({ color, size, compact, className, count, max, hideZero, "data-testid": dataTestId, ref, }: BadgeProps) => ReactElement | null;
73
74
  export {};
@@ -36,7 +36,7 @@ import { BreadcrumbContainerProps, BreadcrumbProps } from "./utils/types";
36
36
  * @param {BreadcrumbProps} props - The props for the Breadcrumb component
37
37
  * @returns {ReactElement} Breadcrumb component
38
38
  */
39
- export declare const Breadcrumb: ({ className, "data-testid": dataTestId, breadcrumbItems, onClickBack, }: BreadcrumbProps) => ReactElement;
39
+ export declare const Breadcrumb: ({ className, "data-testid": dataTestId, breadcrumbItems, onClickBack, ref, }: BreadcrumbProps) => ReactElement;
40
40
  /**
41
41
  * BreadcrumbContainer is a helper component that renders the breadcrumb items based on the screen size.
42
42
  *
@@ -1,12 +1,13 @@
1
1
  import { MouseEventHandler, ReactElement } from "react";
2
2
  import { CommonProps } from "../../../common/CommonProps";
3
+ import { Refable } from "../../../common/Refable";
3
4
  export interface BreadcrumbItemProps {
4
5
  /** The display text for this breadcrumb item. */
5
6
  label: string;
6
7
  /** The route path this breadcrumb item links to. */
7
8
  to: string;
8
9
  }
9
- export interface BreadcrumbProps extends CommonProps {
10
+ export interface BreadcrumbProps extends CommonProps, Refable<HTMLDivElement> {
10
11
  /**
11
12
  * The ordered list of breadcrumb items representing the navigation hierarchy.
12
13
  * The last item is rendered as plain text (the current page), all preceding items are rendered as clickable links.
@@ -1,7 +1,8 @@
1
- import { InputHTMLAttributes, MouseEventHandler, ReactNode } from "react";
1
+ import { InputHTMLAttributes, MouseEventHandler, ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
+ import { Refable } from "../../common/Refable";
3
4
  export declare const ROLE_CARD = "region";
4
- export interface CardProps extends CommonProps, InputHTMLAttributes<HTMLDivElement> {
5
+ export interface CardProps extends CommonProps, Refable<HTMLDivElement>, InputHTMLAttributes<HTMLDivElement> {
5
6
  /**
6
7
  * Whether the card should have full height or not.
7
8
  */
@@ -70,4 +71,7 @@ export interface CardProps extends CommonProps, InputHTMLAttributes<HTMLDivEleme
70
71
  * @param {CardProps} props - The props for the Card component
71
72
  * @returns {ReactElement} Card component
72
73
  */
73
- export declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLDivElement>>;
74
+ export declare const Card: {
75
+ ({ children, onClick, fullHeight, onMouseEnter, onMouseLeave, className, "data-testid": dataTestId, ref, ...rest }: CardProps): ReactElement;
76
+ displayName: string;
77
+ };
@@ -1,6 +1,7 @@
1
1
  import { ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
- export interface CardBodyProps extends CommonProps {
3
+ import { Refable } from "../../common/Refable";
4
+ export interface CardBodyProps extends CommonProps, Refable<HTMLDivElement> {
4
5
  /**
5
6
  * Sets flex direction
6
7
  */
@@ -30,4 +31,4 @@ export interface CardBodyProps extends CommonProps {
30
31
  * @param {CardBodyProps} props - The props for the CardBody component
31
32
  * @returns {ReactElement} CardBody component
32
33
  */
33
- export declare const CardBody: ({ children, "data-testid": dataTestId, className, direction, gap, padding, id, }: CardBodyProps) => ReactElement;
34
+ export declare const CardBody: ({ children, "data-testid": dataTestId, className, direction, gap, padding, id, ref, }: CardBodyProps) => ReactElement;
@@ -1,6 +1,7 @@
1
1
  import { ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
- export interface CardFooterProps extends CommonProps {
3
+ import { Refable } from "../../common/Refable";
4
+ export interface CardFooterProps extends CommonProps, Refable<HTMLDivElement> {
4
5
  /**
5
6
  * Element to render in the footer
6
7
  */
@@ -22,4 +23,4 @@ export interface CardFooterProps extends CommonProps {
22
23
  * @param {CardFooterProps} props - The props for the CardFooter component
23
24
  * @returns {ReactElement} CardFooter component
24
25
  */
25
- export declare const CardFooter: ({ "data-testid": dataTestId, className, children, padding, hideSeparator, }: CardFooterProps) => ReactElement;
26
+ export declare const CardFooter: ({ "data-testid": dataTestId, className, children, padding, hideSeparator, ref, }: CardFooterProps) => ReactElement;
@@ -1,7 +1,8 @@
1
1
  import { MouseEventHandler, ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
+ import { Refable } from "../../common/Refable";
3
4
  import { HeadingVariant } from "../Heading/Heading";
4
- export interface CardHeaderProps extends CommonProps {
5
+ export interface CardHeaderProps extends CommonProps, Refable<HTMLDivElement> {
5
6
  /**
6
7
  * The text to show in the Cards main heading
7
8
  */
@@ -47,4 +48,4 @@ export interface CardHeaderProps extends CommonProps {
47
48
  * @param {CardHeaderProps} props - The props for the CardHeader component
48
49
  * @returns {ReactElement} CardHeader component
49
50
  */
50
- export declare const CardHeader: ({ heading, headingVariant, subHeading, onClickClose, "data-testid": dataTestId, className, children, accessories, actions, padding, hideSeparator, }: CardHeaderProps) => ReactElement;
51
+ export declare const CardHeader: ({ heading, headingVariant, subHeading, onClickClose, "data-testid": dataTestId, className, children, accessories, actions, padding, hideSeparator, ref, }: CardHeaderProps) => ReactElement;
@@ -1,6 +1,7 @@
1
1
  import { MouseEvent, ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
- export interface CollapseProps extends CommonProps {
3
+ import { Refable } from "../../common/Refable";
4
+ export interface CollapseProps extends CommonProps, Refable<HTMLDivElement> {
4
5
  id: string;
5
6
  /**
6
7
  * Visual variant of the collapse component.
@@ -83,4 +84,4 @@ export interface CollapseProps extends CommonProps {
83
84
  * @param {CollapseProps} props - The props for the Collapse component
84
85
  * @returns {ReactElement} Collapse component
85
86
  */
86
- export declare const Collapse: ({ id, variant, initialExpanded, onToggle, label, children, className, headerClassName, headerAddon, "data-testid": dataTestId, animate, extraPadding, }: CollapseProps) => ReactElement;
87
+ export declare const Collapse: ({ id, variant, initialExpanded, onToggle, label, children, className, headerClassName, headerAddon, "data-testid": dataTestId, animate, extraPadding, ref, }: CollapseProps) => ReactElement;
@@ -1,6 +1,7 @@
1
1
  import { ReactElement } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
- export interface CopyableTextProps extends CommonProps {
3
+ import { Refable } from "../../common/Refable";
4
+ export interface CopyableTextProps extends CommonProps, Refable<HTMLSpanElement> {
4
5
  /**
5
6
  * The text shown in the ui.
6
7
  * By default this is also the text that gets copied when component is clicked.
@@ -18,4 +19,4 @@ export interface CopyableTextProps extends CommonProps {
18
19
  * @param {CopyableTextProps} props - The props for the CopyableText component
19
20
  * @returns {ReactElement} CopyableText component
20
21
  */
21
- export declare const CopyableText: ({ text, alternativeText, "data-testid": dataTestId, className, }: CopyableTextProps) => ReactElement;
22
+ export declare const CopyableText: ({ text, alternativeText, "data-testid": dataTestId, className, ref, }: CopyableTextProps) => ReactElement;
@@ -1,5 +1,6 @@
1
1
  import { ReactElement } from "react";
2
- interface DetailsListProps {
2
+ import { Refable } from "../../common/Refable";
3
+ interface DetailsListProps extends Refable<HTMLDivElement> {
3
4
  details: Array<string>;
4
5
  className?: string;
5
6
  hasLink?: boolean;
@@ -11,7 +12,8 @@ interface DetailsListProps {
11
12
  * @param {string[]} props.details - Values to render.
12
13
  * @param {string} [props.className] - Optional CSS class for customization.
13
14
  * @param {boolean} [props.hasLink=false] - Whether the parent component contains a link.
15
+ * @param [props.ref] - Ref forwarded to the root element.
14
16
  * @returns {ReactElement} The details list element.
15
17
  */
16
- export declare const DetailsList: ({ details, className, hasLink }: DetailsListProps) => ReactElement;
18
+ export declare const DetailsList: ({ details, className, hasLink, ref }: DetailsListProps) => ReactElement;
17
19
  export {};
@@ -1,5 +1,6 @@
1
1
  import { MouseEventHandler, ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
+ import { Refable } from "../../common/Refable";
3
4
  type EmptyStateImage = "WORKER_WITH_SIGN" | "ROAD_BLOCK" | "BUILDING_ERROR" | "WALL_CONSTRUCTION" | "PHONE_LOCK_SECURITY" | "SEARCH_DOCUMENT";
4
5
  type EmptyStateButtonAction = {
5
6
  disabled?: boolean;
@@ -11,7 +12,7 @@ type EmptyStateButtonAction = {
11
12
  target?: string;
12
13
  };
13
14
  };
14
- export interface EmptyStateProps extends CommonProps {
15
+ export interface EmptyStateProps extends CommonProps, Refable<HTMLDivElement> {
15
16
  description?: string;
16
17
  altText?: string;
17
18
  image?: EmptyStateImage;
@@ -1,6 +1,7 @@
1
1
  import { ReactElement } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
- export type EmptyValueProps = CommonProps;
3
+ import { Refable } from "../../common/Refable";
4
+ export type EmptyValueProps = CommonProps & Refable<HTMLDivElement>;
4
5
  /**
5
6
  * The EmptyValue component renders a consistent "–" symbol to represent empty, null, undefined, or not applicable values in tables.
6
7
  *
@@ -1,6 +1,7 @@
1
1
  import { MouseEventHandler, ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
- export interface ExternalLinkProps extends CommonProps {
3
+ import { Refable } from "../../common/Refable";
4
+ export interface ExternalLinkProps extends CommonProps, Refable<HTMLAnchorElement> {
4
5
  /**
5
6
  * The URL to which users are redirected
6
7
  */
@@ -33,4 +34,4 @@ export interface ExternalLinkProps extends CommonProps {
33
34
  * @param {ExternalLinkProps} props - The props for the external link component
34
35
  * @returns {ReactElement} External Link component
35
36
  */
36
- export declare const ExternalLink: ({ rel, target, href, className, children, title, "data-testid": dataTestId, onClick, color, }: ExternalLinkProps) => ReactElement;
37
+ export declare const ExternalLink: ({ rel, target, href, className, children, title, "data-testid": dataTestId, onClick, color, ref, }: ExternalLinkProps) => ReactElement;
@@ -1,7 +1,8 @@
1
1
  import { ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
+ import { Refable } from "../../common/Refable";
3
4
  export type HeadingVariant = "primary" | "secondary" | "tertiary" | "subtitle";
4
- export interface HeadingProps extends CommonProps {
5
+ export interface HeadingProps extends CommonProps, Refable<HTMLHeadingElement> {
5
6
  /**
6
7
  * Child Nodes.
7
8
  */
@@ -25,4 +26,4 @@ export interface HeadingProps extends CommonProps {
25
26
  * @param {HeadingProps} props - The props for the Heading component
26
27
  * @returns {ReactElement} Heading component
27
28
  */
28
- export declare const Heading: ({ variant, inverted, subtle, className, "data-testid": dataTestId, ...rest }: HeadingProps) => ReactElement;
29
+ export declare const Heading: ({ variant, inverted, subtle, className, "data-testid": dataTestId, ref, ...rest }: HeadingProps) => ReactElement;
@@ -1,7 +1,8 @@
1
1
  import { ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
+ import { Refable } from "../../common/Refable";
3
4
  import { Styleable } from "../../common/Styleable";
4
- export interface HorizontalOverflowScrollerProps extends CommonProps, Styleable {
5
+ export interface HorizontalOverflowScrollerProps extends CommonProps, Styleable, Refable<HTMLDivElement> {
5
6
  children: ReactNode;
6
7
  /**
7
8
  * Callback fired when scroll state changes (scrollable, at edges, etc.)
@@ -21,6 +22,7 @@ export interface HorizontalOverflowScrollerProps extends CommonProps, Styleable
21
22
  * @param props.className - Optional CSS class name for styling
22
23
  * @param props."data-testid" - Optional test ID for testing purposes
23
24
  * @param props.onScrollStateChange - Optional callback fired when scroll state changes
25
+ * @param [props.ref] - Ref forwarded to the root element
24
26
  * @returns {ReactElement} A horizontal overflow scroller component with visual indicators
25
27
  */
26
- export declare const HorizontalOverflowScroller: ({ className, "data-testid": dataTestId, children, onScrollStateChange, }: HorizontalOverflowScrollerProps) => ReactElement;
28
+ export declare const HorizontalOverflowScroller: ({ className, "data-testid": dataTestId, children, onScrollStateChange, ref, }: HorizontalOverflowScrollerProps) => ReactElement;
@@ -1,8 +1,9 @@
1
1
  import { ActivityColors, CriticalityColors, GeneralColors, IntentColors, RentalStatusColors, SitesColors, UtilizationColors } from "@trackunit/ui-design-tokens";
2
2
  import { IconName } from "@trackunit/ui-icons";
3
- import { CSSProperties, MouseEventHandler, ReactElement, RefObject } from "react";
3
+ import { CSSProperties, MouseEventHandler, ReactElement } from "react";
4
4
  import { AriaProps } from "../../common/AriaProps";
5
5
  import { CommonProps } from "../../common/CommonProps";
6
+ import { Refable } from "../../common/Refable";
6
7
  import { Size } from "../../common/Size";
7
8
  export type IconColors = IntentColors | GeneralColors | CriticalityColors | ActivityColors | UtilizationColors | SitesColors | RentalStatusColors;
8
9
  export declare const iconPalette: {
@@ -254,7 +255,7 @@ type IconPropsLarge = {
254
255
  type?: "solid" | "outline";
255
256
  };
256
257
  type DiscriminatedIconProps = IconPropsSmall | IconPropsMedium | IconPropsLarge;
257
- export type IconProps = DiscriminatedIconProps & CommonProps & AriaProps & {
258
+ export type IconProps = DiscriminatedIconProps & CommonProps & AriaProps & Refable<HTMLSpanElement> & {
258
259
  /**
259
260
  * The name of the icon to be rendered.
260
261
  * HeroIconName and TrackunitIconName are supported.
@@ -279,12 +280,6 @@ export type IconProps = DiscriminatedIconProps & CommonProps & AriaProps & {
279
280
  */
280
281
  type?: "solid" | "outline" | "mini";
281
282
  onClick?: MouseEventHandler<HTMLSpanElement>;
282
- /**
283
- * Ref forwarded to the span element
284
- *
285
- * @memberof IconProps
286
- */
287
- forwardedRef?: RefObject<HTMLSpanElement>;
288
283
  /**
289
284
  * Custom styles object used to override existing styles or add some extra styling
290
285
  *
@@ -306,5 +301,5 @@ export type IconProps = DiscriminatedIconProps & CommonProps & AriaProps & {
306
301
  * @param {IconProps} props - The props for the Icon component
307
302
  * @returns {ReactElement} Icon component
308
303
  */
309
- export declare const Icon: ({ name, size, className, "data-testid": dataTestId, color, onClick, type, style, forwardedRef, ariaLabel, fontSize, ariaLabelledBy, ariaDescribedBy, ariaHidden, }: IconProps) => ReactElement;
304
+ export declare const Icon: ({ name, size, className, "data-testid": dataTestId, color, onClick, type, style, ref, ariaLabel, fontSize, ariaLabelledBy, ariaDescribedBy, ariaHidden, }: IconProps) => ReactElement;
310
305
  export {};
@@ -1,7 +1,8 @@
1
1
  import { ActivityColors, CriticalityColors, GeneralColors, IntentColors, RentalStatusColors, SitesColors, UtilizationColors } from "@trackunit/ui-design-tokens";
2
2
  import { ReactElement } from "react";
3
3
  import { CommonProps } from "../../common/CommonProps";
4
- export interface IndicatorProps extends CommonProps {
4
+ import { Refable } from "../../common/Refable";
5
+ export interface IndicatorProps extends CommonProps, Refable<HTMLDivElement> {
5
6
  /**
6
7
  * The icon to be rendered inside the indicator component
7
8
  */
@@ -72,4 +73,4 @@ export interface IndicatorProps extends CommonProps {
72
73
  * @param {IndicatorProps} props - The props for the Indicator component
73
74
  * @returns {ReactElement} Indicator component
74
75
  */
75
- export declare const Indicator: ({ "data-testid": dataTestId, icon, label, color, withBackground, withLabel, ping, size, weight, className, ...rest }: IndicatorProps) => ReactElement;
76
+ export declare const Indicator: ({ "data-testid": dataTestId, icon, label, color, withBackground, withLabel, ping, size, weight, className, ref, ...rest }: IndicatorProps) => ReactElement;
@@ -1,7 +1,8 @@
1
1
  import { ReactElement } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
+ import { Refable } from "../../common/Refable";
3
4
  import { Styleable } from "../../common/Styleable";
4
- export interface KPIProps extends CommonProps, Styleable {
5
+ export interface KPIProps extends CommonProps, Styleable, Refable<HTMLDivElement> {
5
6
  /**
6
7
  * The title of the KPI
7
8
  */
@@ -64,4 +65,4 @@ export interface KPIProps extends CommonProps, Styleable {
64
65
  * @param {KPIProps} props - The props for the KPI component
65
66
  * @returns {ReactElement} KPI component
66
67
  */
67
- export declare const KPI: ({ title, value, unit, className, "data-testid": dataTestId, tooltipLabel, variant, style, ...rest }: KPIProps) => ReactElement;
68
+ export declare const KPI: ({ title, value, unit, className, "data-testid": dataTestId, tooltipLabel, variant, style, ref, ...rest }: KPIProps) => ReactElement;
@@ -1,7 +1,8 @@
1
1
  import { ReactElement } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
+ import { Refable } from "../../common/Refable";
3
4
  import { Styleable } from "../../common/Styleable";
4
- export interface KPISkeletonProps extends CommonProps, Styleable {
5
+ export interface KPISkeletonProps extends CommonProps, Styleable, Refable<HTMLDivElement> {
5
6
  /**
6
7
  * The size of the KPI skeleton
7
8
  */
@@ -11,4 +12,4 @@ export interface KPISkeletonProps extends CommonProps, Styleable {
11
12
  * Skeleton loading indicator that mimics the KPI component structure.
12
13
  * Uses the same layout, spacing, and visual hierarchy as KPI.
13
14
  */
14
- export declare const KPISkeleton: ({ variant, className, "data-testid": dataTestId, style, ...rest }: KPISkeletonProps) => ReactElement;
15
+ export declare const KPISkeleton: ({ variant, className, "data-testid": dataTestId, style, ref, ...rest }: KPISkeletonProps) => ReactElement;
@@ -1,12 +1,13 @@
1
1
  import { MappedOmit } from "@trackunit/shared-utils";
2
2
  import { IconName } from "@trackunit/ui-icons";
3
3
  import { MouseEventHandler, ReactElement, ReactNode } from "react";
4
+ import { Refable } from "../../common/Refable";
4
5
  import { IconColors } from "../Icon/Icon";
5
6
  import { KPIProps } from "../KPI/KPI";
6
7
  import { NoticeProps } from "../Notice/Notice";
7
8
  import { ValueBarProps } from "../ValueBar/ValueBar";
8
9
  import { TrendIndicatorProps } from "./components/TrendIndicator/TrendIndicator";
9
- export interface KPICardProps extends MappedOmit<KPIProps, "variant"> {
10
+ export interface KPICardProps extends MappedOmit<KPIProps, "variant">, Refable<HTMLDivElement> {
10
11
  /**
11
12
  * Is the kpi card active
12
13
  */
@@ -92,4 +93,4 @@ export interface KPICardProps extends MappedOmit<KPIProps, "variant"> {
92
93
  * @param {KPICardProps} props - The props for the KPICard component
93
94
  * @returns {ReactElement} KPICard component
94
95
  */
95
- export declare const KPICard: ({ isActive, onClick, className, "data-testid": dataTestId, children, iconName, iconColor, notice, valueBar, trends, unit, ...rest }: KPICardProps) => ReactElement;
96
+ export declare const KPICard: ({ isActive, onClick, className, "data-testid": dataTestId, children, iconName, iconColor, notice, valueBar, trends, unit, ref, ...rest }: KPICardProps) => ReactElement;
@@ -1,7 +1,8 @@
1
1
  import { ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
+ import { Refable } from "../../common/Refable";
3
4
  import { Styleable } from "../../common/Styleable";
4
- export interface KPICardSkeletonProps extends CommonProps, Styleable {
5
+ export interface KPICardSkeletonProps extends CommonProps, Styleable, Refable<HTMLDivElement> {
5
6
  /**
6
7
  * Whether to show an icon skeleton
7
8
  */
@@ -27,4 +28,4 @@ export interface KPICardSkeletonProps extends CommonProps, Styleable {
27
28
  * Skeleton loading indicator that mimics the KPICard component structure.
28
29
  * Uses the same layout, spacing, and visual hierarchy as KPICard.
29
30
  */
30
- export declare const KPICardSkeleton: ({ hasIcon, hasTrends, hasValueBar, hasNotice, children, className, "data-testid": dataTestId, style, ...rest }: KPICardSkeletonProps) => ReactElement;
31
+ export declare const KPICardSkeleton: ({ hasIcon, hasTrends, hasValueBar, hasNotice, children, className, "data-testid": dataTestId, style, ref, ...rest }: KPICardSkeletonProps) => ReactElement;
@@ -1,7 +1,8 @@
1
1
  import { ReactElement } from "react";
2
2
  import { CommonProps } from "../../../../common/CommonProps";
3
+ import { Refable } from "../../../../common/Refable";
3
4
  import { KPICardProps } from "../../KPICard";
4
- export interface TrendIndicatorProps extends CommonProps {
5
+ export interface TrendIndicatorProps extends CommonProps, Refable<HTMLDivElement> {
5
6
  /**
6
7
  * The absolute value
7
8
  */
@@ -29,4 +30,4 @@ export interface TrendIndicatorProps extends CommonProps {
29
30
  * @param {TrendIndicatorProps} props - The props for the TrendIndicator component
30
31
  * @returns {ReactElement} TrendIndicator component
31
32
  */
32
- export declare const TrendIndicator: ({ value, trend, label, icon, color, "data-testid": dataTestId, className, }: TrendIndicatorProps) => ReactElement;
33
+ export declare const TrendIndicator: ({ value, trend, label, icon, color, "data-testid": dataTestId, className, ref, }: TrendIndicatorProps) => ReactElement;
@@ -1,7 +1,8 @@
1
1
  import { ReactElement } from "react";
2
2
  import { CommonProps } from "../../../common/CommonProps";
3
+ import { Refable } from "../../../common/Refable";
3
4
  import { TrendIndicatorProps } from "./TrendIndicator/TrendIndicator";
4
- export interface TrendIndicatorsProps extends CommonProps {
5
+ export interface TrendIndicatorsProps extends CommonProps, Refable<HTMLSpanElement> {
5
6
  trends: Array<Omit<TrendIndicatorProps, "className" | "data-testid">>;
6
7
  }
7
8
  /**
@@ -10,4 +11,4 @@ export interface TrendIndicatorsProps extends CommonProps {
10
11
  * @param {TrendIndicatorsProps} props - The props for the TrendIndicators component
11
12
  * @returns {ReactElement} TrendIndicators component
12
13
  */
13
- export declare const TrendIndicators: ({ trends, "data-testid": dataTestId, className, }: TrendIndicatorsProps) => ReactElement;
14
+ export declare const TrendIndicators: ({ trends, "data-testid": dataTestId, className, ref, }: TrendIndicatorsProps) => ReactElement;
@@ -1,9 +1,10 @@
1
1
  import { VariantProps } from "@trackunit/css-class-variance-utilities";
2
2
  import { MouseEventHandler, ReactElement, ReactNode } from "react";
3
3
  import { CommonProps } from "../../../common/CommonProps";
4
+ import { Refable } from "../../../common/Refable";
4
5
  import { cvaMenuItemStyle } from "./MenuItem.variants";
5
6
  export type MenuItemVariant = "primary" | "danger";
6
- export interface MenuItemProps extends CommonProps {
7
+ export interface MenuItemProps extends CommonProps, Refable<HTMLDivElement> {
7
8
  /**
8
9
  * The unique id for the menu item
9
10
  */
@@ -90,4 +91,4 @@ export interface MenuItemProps extends CommonProps {
90
91
  * @param {MenuItemProps} props - The props for the MenuItem component
91
92
  * @returns {ReactElement} MenuItem component
92
93
  */
93
- export declare const MenuItem: ({ className, "data-testid": dataTestId, label, children, selected, focused, prefix, suffix, disabled, onClick, stopPropagation, id, tabIndex, optionLabelDescription, optionPrefix, fieldSize, variant, }: MenuItemProps) => ReactElement;
94
+ export declare const MenuItem: ({ className, "data-testid": dataTestId, label, children, selected, focused, prefix, suffix, disabled, onClick, stopPropagation, id, tabIndex, optionLabelDescription, optionPrefix, fieldSize, variant, ref, }: MenuItemProps) => ReactElement;
@@ -1,6 +1,7 @@
1
1
  import { MouseEventHandler, ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../../common/CommonProps";
3
- export interface MenuListProps extends CommonProps {
3
+ import { Refable } from "../../../common/Refable";
4
+ export interface MenuListProps extends CommonProps, Refable<HTMLDivElement> {
4
5
  /**
5
6
  * List of menu items to be rendered.
6
7
  */
@@ -78,4 +79,4 @@ export interface MenuListProps extends CommonProps {
78
79
  * @param {MenuListProps} props - The props for the MenuList component
79
80
  * @returns {ReactElement} MenuList component
80
81
  */
81
- export declare const MenuList: ({ "data-testid": dataTestId, className, children, isMulti, selectedItems: controlledSelectedItems, onSelectionChange, ...args }: MenuListProps) => ReactElement;
82
+ export declare const MenuList: ({ "data-testid": dataTestId, className, children, isMulti, selectedItems: controlledSelectedItems, onSelectionChange, ref, ...args }: MenuListProps) => ReactElement;
@@ -1,6 +1,7 @@
1
1
  import { MakePropertyOptional, MappedOmit } from "@trackunit/shared-utils";
2
2
  import { ReactElement, ReactNode } from "react";
3
3
  import { CommonProps } from "../../../common/CommonProps";
4
+ import { Refable } from "../../../common/Refable";
4
5
  import { IconProps } from "../../Icon/Icon";
5
6
  import { PopoverContentChildren } from "../../Popover/PopoverContent";
6
7
  import { PopoverProps } from "../../Popover/PopoverTypes";
@@ -8,7 +9,7 @@ import { IconButtonProps } from "../../buttons/IconButton/IconButton";
8
9
  export type MenuPlacement = "above" | "below";
9
10
  type FilteredIconProps = MakePropertyOptional<MappedOmit<IconProps, "onClick">, "name">;
10
11
  type FilteredIconButtonProps = Omit<IconButtonProps, "icon" | "onClick">;
11
- export interface MoreMenuProps extends CommonProps {
12
+ export interface MoreMenuProps extends CommonProps, Refable<HTMLDivElement> {
12
13
  children: PopoverContentChildren;
13
14
  popoverProps?: PopoverProps;
14
15
  iconProps?: FilteredIconProps;
@@ -23,5 +24,5 @@ export interface MoreMenuProps extends CommonProps {
23
24
  * @param {MoreMenuProps} props - The props for the MoreMenu component
24
25
  * @returns {ReactElement} MoreMenu component
25
26
  */
26
- export declare const MoreMenu: ({ className, "data-testid": dataTestId, popoverProps, iconProps, iconButtonProps, customButton, customPortalId, children, }: MoreMenuProps) => ReactElement;
27
+ export declare const MoreMenu: ({ className, "data-testid": dataTestId, popoverProps, iconProps, iconButtonProps, customButton, customPortalId, children, ref, }: MoreMenuProps) => ReactElement;
27
28
  export {};
@@ -2,8 +2,9 @@ import { GeneralColors, IntentColors } from "@trackunit/ui-design-tokens";
2
2
  import { IconName } from "@trackunit/ui-icons";
3
3
  import { ReactElement } from "react";
4
4
  import { CommonProps } from "../../common/CommonProps";
5
+ import { Refable } from "../../common/Refable";
5
6
  import { Size } from "../../common/Size";
6
- export interface NoticeProps extends CommonProps {
7
+ export interface NoticeProps extends CommonProps, Refable<HTMLDivElement> {
7
8
  /**
8
9
  * The name of the icon
9
10
  */
@@ -51,4 +52,4 @@ export interface NoticeProps extends CommonProps {
51
52
  * @param {NoticeProps} props - The props for the Notice component
52
53
  * @returns {ReactElement} Notice component
53
54
  */
54
- export declare const Notice: ({ "data-testid": dataTestId, iconName, iconSize, iconColor, label, color, withLabel, className, tooltipLabel, withTooltip, size, ...rest }: NoticeProps) => ReactElement;
55
+ export declare const Notice: ({ "data-testid": dataTestId, iconName, iconSize, iconColor, label, color, withLabel, className, tooltipLabel, withTooltip, size, ref, ...rest }: NoticeProps) => ReactElement;
@@ -1,6 +1,7 @@
1
1
  import { VariantProps } from "@trackunit/css-class-variance-utilities";
2
2
  import { ReactElement, ReactNode } from "react";
3
3
  import { CommonProps } from "../../common/CommonProps";
4
+ import { Refable } from "../../common/Refable";
4
5
  import { cvaPage } from "./Page.variants";
5
6
  /**
6
7
  * The layout of the page.
@@ -9,7 +10,7 @@ export type Layout = VariantProps<typeof cvaPage>["layout"];
9
10
  /**
10
11
  * The props for the page component.
11
12
  */
12
- export interface PageProps extends CommonProps {
13
+ export interface PageProps extends CommonProps, Refable<HTMLDivElement> {
13
14
  layout: Layout;
14
15
  children?: ReactNode;
15
16
  "data-testid"?: string;
@@ -17,4 +18,4 @@ export interface PageProps extends CommonProps {
17
18
  /**
18
19
  * Renders the page component. Adds padding and layout to the page.
19
20
  */
20
- export declare const Page: ({ layout, className, children, "data-testid": dataTestId }: PageProps) => ReactElement;
21
+ export declare const Page: ({ layout, className, children, "data-testid": dataTestId, ref }: PageProps) => ReactElement;
@@ -1,6 +1,7 @@
1
1
  import { VariantProps } from "@trackunit/css-class-variance-utilities";
2
2
  import { ReactElement, ReactNode } from "react";
3
3
  import { CommonProps } from "../../common/CommonProps";
4
+ import { Refable } from "../../common/Refable";
4
5
  import { cvaPageContent } from "./Page.variants";
5
6
  /**
6
7
  * The layout of the page.
@@ -9,7 +10,7 @@ export type PageContentLayout = VariantProps<typeof cvaPageContent>["layout"];
9
10
  /**
10
11
  * The props for the page content component.
11
12
  */
12
- interface PageContentProps extends CommonProps {
13
+ interface PageContentProps extends CommonProps, Refable<HTMLDivElement> {
13
14
  layout: PageContentLayout;
14
15
  children?: ReactNode;
15
16
  }
@@ -20,5 +21,5 @@ interface PageContentProps extends CommonProps {
20
21
  * @param {PageContentProps} props - The component props.
21
22
  * @returns {ReactNode} - The rendered component.
22
23
  */
23
- export declare const PageContent: ({ className, children, "data-testid": dataTestId, layout, }: PageContentProps) => ReactElement;
24
+ export declare const PageContent: ({ className, children, "data-testid": dataTestId, layout, ref, }: PageContentProps) => ReactElement;
24
25
  export {};
@@ -49,4 +49,4 @@ import { PageHeaderProps } from "./types";
49
49
  * @param {PageHeaderProps} props - The props for the PageHeader component
50
50
  * @returns {ReactElement} PageHeader component
51
51
  */
52
- export declare const PageHeader: ({ className, "data-testid": dataTestId, showLoading, description, title, tagLabel, backTo, tagColor, tabsList, descriptionIcon, tagTooltipLabel, ...discriminatedProps }: PageHeaderProps) => ReactElement;
52
+ export declare const PageHeader: ({ className, "data-testid": dataTestId, showLoading, description, title, tagLabel, backTo, tagColor, tabsList, descriptionIcon, tagTooltipLabel, ref, ...discriminatedProps }: PageHeaderProps) => ReactElement;
@@ -1,12 +1,14 @@
1
1
  import { ReactElement } from "react";
2
+ import { Refable } from "../../../common/Refable";
2
3
  import { PageHeaderKpiMetricsType } from "../types";
3
4
  /**
4
5
  * Renders KPI metrics in the PageHeader component.
5
6
  *
6
7
  * @param {object} props - The props for the PageHeaderKpiMetrics component
7
8
  * @param {Array<PageHeaderKpiMetricsType>} props.kpiMetrics - The KPI metrics to render
9
+ * @param [props.ref] - Ref forwarded to the root element
8
10
  * @returns {ReactElement} PageHeaderKpiMetrics component
9
11
  */
10
- export declare const PageHeaderKpiMetrics: ({ kpiMetrics }: {
12
+ export declare const PageHeaderKpiMetrics: ({ kpiMetrics, ref, }: {
11
13
  kpiMetrics: Array<PageHeaderKpiMetricsType>;
12
- }) => ReactElement;
14
+ } & Refable<HTMLDivElement>) => ReactElement;