@trackunit/react-components 1.8.22 → 1.8.24

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 (59) hide show
  1. package/index.cjs.js +257 -205
  2. package/index.esm.js +256 -204
  3. package/package.json +7 -7
  4. package/src/common/PackageNameStoryComponent.d.ts +2 -1
  5. package/src/components/Alert/Alert.d.ts +2 -2
  6. package/src/components/Badge/Badge.d.ts +2 -1
  7. package/src/components/Breadcrumb/Breadcrumb.d.ts +3 -2
  8. package/src/components/Breadcrumb/BreadcrumbForLargeScreen.d.ts +2 -1
  9. package/src/components/Breadcrumb/BreadcrumbForMediumScreen.d.ts +2 -1
  10. package/src/components/Breadcrumb/BreadcrumbForSmallScreen.d.ts +2 -1
  11. package/src/components/Breadcrumb/BreadcrumbItem.d.ts +2 -1
  12. package/src/components/Card/Card.d.ts +2 -2
  13. package/src/components/Card/CardBody.d.ts +2 -2
  14. package/src/components/Card/CardFooter.d.ts +2 -2
  15. package/src/components/Card/CardHeader.d.ts +3 -3
  16. package/src/components/Collapse/Collapse.d.ts +2 -2
  17. package/src/components/CompletionStatusIndicator/CompletionStatusIndicator.d.ts +2 -1
  18. package/src/components/CopyableText/CopyableText.d.ts +2 -1
  19. package/src/components/EmptyState/EmptyState.d.ts +2 -1
  20. package/src/components/Highlight/Highlight.d.ts +2 -2
  21. package/src/components/Icon/Icon.d.ts +2 -2
  22. package/src/components/InteractableItem/InteractableItem.variants.d.ts +2 -2
  23. package/src/components/KPICard/KPICard.d.ts +1 -1
  24. package/src/components/{VirtualizedList/VirtualizedList.d.ts → List/List.d.ts} +4 -4
  25. package/src/components/{VirtualizedList/VirtualizedList.variants.d.ts → List/List.variants.d.ts} +3 -3
  26. package/src/components/Menu/MenuDivider/MenuDivider.d.ts +2 -1
  27. package/src/components/Menu/MenuItem/MenuItem.d.ts +2 -2
  28. package/src/components/Menu/MenuItem/MenuItem.variants.d.ts +3 -2
  29. package/src/components/Menu/MoreMenu/MoreMenu.d.ts +2 -2
  30. package/src/components/Page/Page.d.ts +2 -2
  31. package/src/components/Page/PageContent.d.ts +2 -2
  32. package/src/components/PageHeader/components/PageHeaderKpiMetrics.d.ts +9 -1
  33. package/src/components/PageHeader/components/PageHeaderSecondaryActions.d.ts +17 -2
  34. package/src/components/PageHeader/components/PageHeaderTitle.d.ts +10 -1
  35. package/src/components/Pagination/Pagination.d.ts +2 -1
  36. package/src/components/Polygon/Polygon.d.ts +2 -1
  37. package/src/components/Popover/PopoverContent.d.ts +2 -2
  38. package/src/components/Popover/PopoverTitle.d.ts +2 -2
  39. package/src/components/Popover/PopoverTrigger.d.ts +2 -2
  40. package/src/components/Portal/Portal.d.ts +2 -1
  41. package/src/components/Sidebar/Sidebar.d.ts +1 -1
  42. package/src/components/Sidebar/useOverflowItems.d.ts +1 -1
  43. package/src/components/SkeletonLines/SkeletonLines.d.ts +2 -1
  44. package/src/components/Spacer/Spacer.d.ts +2 -1
  45. package/src/components/Spinner/Spinner.d.ts +2 -1
  46. package/src/components/Tabs/Tab.d.ts +1 -1
  47. package/src/components/Tabs/TabContent.d.ts +2 -2
  48. package/src/components/Tabs/TabList.d.ts +1 -1
  49. package/src/components/Tabs/Tabs.d.ts +2 -2
  50. package/src/components/Tag/Tag.d.ts +2 -2
  51. package/src/components/ToggleGroup/ToggleGroup.d.ts +3 -3
  52. package/src/components/ValueBar/ValueBar.d.ts +2 -1
  53. package/src/components/ZStack/ZStack.d.ts +2 -2
  54. package/src/components/buttons/Button/Button.d.ts +2 -2
  55. package/src/components/buttons/IconButton/IconButton.d.ts +4 -3
  56. package/src/components/buttons/StarButton/StarButton.d.ts +2 -2
  57. package/src/components/index.d.ts +2 -2
  58. package/src/hooks/useContinuousTimeout.d.ts +1 -1
  59. package/src/hooks/useSelfUpdatingRef.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  import { TabsContentProps } from "@radix-ui/react-tabs";
2
2
  import { IconName } from "@trackunit/ui-icons";
3
- import { ReactNode } from "react";
3
+ import { ReactElement, ReactNode } from "react";
4
4
  export interface TabContentProps extends TabsContentProps {
5
5
  className?: string;
6
6
  dataTestId?: string;
@@ -11,4 +11,4 @@ export interface TabContentProps extends TabsContentProps {
11
11
  /**
12
12
  * Wrapper for radix tab content component.
13
13
  */
14
- export declare const TabContent: ({ className, dataTestId, children, ...rest }: TabContentProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const TabContent: ({ className, dataTestId, children, ...rest }: TabContentProps) => ReactElement;
@@ -18,4 +18,4 @@ export interface TabListProps extends TabsListProps {
18
18
  /**
19
19
  * Wrapper for radix tab list component.
20
20
  */
21
- export declare const TabList: ({ className, dataTestId, children, ...rest }: TabListProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const TabList: ({ className, dataTestId, children, ...rest }: TabListProps) => ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { TabsProps as TabsRootProps } from "@radix-ui/react-tabs";
2
- import { ReactNode } from "react";
2
+ import { ReactElement, ReactNode } from "react";
3
3
  export interface TabsProps extends TabsRootProps {
4
4
  /**
5
5
  * If set to true, forces the content of all tabs to render even if not selected.
@@ -25,4 +25,4 @@ export interface TabsProps extends TabsRootProps {
25
25
  /**
26
26
  * Tabs are used to group different but related content, allowing users to navigate views without leaving the page. They always contain at least two items and one tab is active at a time. Tabs can be used on full page layouts or in components such as modals or tables.
27
27
  */
28
- export declare const Tabs: ({ children, forceRender, className, dataTestId, fullWidth, ...rest }: TabsProps) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const Tabs: ({ children, forceRender, className, dataTestId, fullWidth, ...rest }: TabsProps) => ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { ActivityColors, CriticalityColors, GeneralColors, IntentColors } from "@trackunit/ui-design-tokens";
2
- import { MouseEventHandler, ReactNode, Ref } from "react";
2
+ import { MouseEventHandler, ReactElement, ReactNode, Ref } from "react";
3
3
  import { CommonProps, Size } from "../../common";
4
4
  export type TagSize = Extract<Size, "small" | "medium">;
5
5
  export type TagColors = IntentColors | GeneralColors | CriticalityColors | ActivityColors;
@@ -58,6 +58,6 @@ export interface TagProps extends CommonProps {
58
58
  * @returns {ReactElement} The rendered Tag component.
59
59
  */
60
60
  export declare const Tag: {
61
- ({ className, dataTestId, children, size, onClose, color, disabled, ref, icon, onMouseEnter, }: TagProps): import("react/jsx-runtime").JSX.Element;
61
+ ({ className, dataTestId, children, size, onClose, color, disabled, ref, icon, onMouseEnter, }: TagProps): ReactElement;
62
62
  displayName: string;
63
63
  };
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from "@trackunit/css-class-variance-utilities";
2
2
  import { MappedOmit } from "@trackunit/shared-utils";
3
3
  import { IconName } from "@trackunit/ui-icons";
4
- import { Dispatch, SetStateAction } from "react";
4
+ import { Dispatch, ReactElement, SetStateAction } from "react";
5
5
  import { CommonProps } from "../../common/CommonProps";
6
6
  import { TooltipPlacement } from "../Tooltip/Tooltip";
7
7
  import { cvaToggleGroup } from "./ToggleGroup.variants";
@@ -38,7 +38,7 @@ export interface BasicToggleGroupListProps<TSelectedId extends string = string>
38
38
  placement?: TooltipPlacement;
39
39
  };
40
40
  }
41
- export type ToggleGroupProps<TSelectedId extends string = string> = CommonProps & Omit<VariantProps<typeof cvaToggleGroup>, "className"> & {
41
+ export type ToggleGroupProps<TSelectedId extends string = string> = CommonProps & MappedOmit<VariantProps<typeof cvaToggleGroup>, "className"> & {
42
42
  list: ReadonlyArray<BasicToggleGroupListProps<TSelectedId>>;
43
43
  /**
44
44
  * Instead of onClick, we now use onChange to return the selected value
@@ -62,7 +62,7 @@ export type ToggleGroupProps<TSelectedId extends string = string> = CommonProps
62
62
  * @param {ToggleGroupProps} props - The props for the ToggleGroup component
63
63
  * @returns {ReactElement} ToggleGroup component
64
64
  */
65
- export declare const ToggleGroup: <TSelectedId extends string = string>({ list, selected, setSelected, onChange, disabled, size, isIconOnly, className, dataTestId, }: ToggleGroupProps<TSelectedId>) => import("react/jsx-runtime").JSX.Element;
65
+ export declare const ToggleGroup: <TSelectedId extends string = string>({ list, selected, setSelected, onChange, disabled, size, isIconOnly, className, dataTestId, }: ToggleGroupProps<TSelectedId>) => ReactElement;
66
66
  export interface ToggleItemProps extends CommonProps, MappedOmit<BasicToggleGroupListProps<string>, "id"> {
67
67
  title: string;
68
68
  text?: {
@@ -1,3 +1,4 @@
1
+ import { ReactElement } from "react";
1
2
  import { CommonProps, Size } from "../../common";
2
3
  import { LevelColors } from "./ValueBarTypes";
3
4
  type ValueBarSize = Extract<Size, "small" | "large"> | "extraSmall";
@@ -47,5 +48,5 @@ export interface ValueBarProps extends CommonProps {
47
48
  * @param {ValueBarProps} props - The props for the ValueBar component
48
49
  * @returns {ReactElement} ValueBar component
49
50
  */
50
- export declare const ValueBar: ({ value, min, max, unit, size, levelColors, valueColor, showValue, className, dataTestId, zeroScoreAllowed, }: ValueBarProps) => import("react/jsx-runtime").JSX.Element;
51
+ export declare const ValueBar: ({ value, min, max, unit, size, levelColors, valueColor, showValue, className, dataTestId, zeroScoreAllowed, }: ValueBarProps) => ReactElement;
51
52
  export {};
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactElement, ReactNode } from "react";
2
2
  import { CommonProps } from "../../common/CommonProps";
3
3
  export type ZStackProps = CommonProps & {
4
4
  children: ReactNode;
@@ -10,4 +10,4 @@ export type ZStackProps = CommonProps & {
10
10
  * @param { ZStackProps} props - The props for the ZStack component
11
11
  * @returns {Element} ZStack component
12
12
  */
13
- export declare const ZStack: ({ children, className, dataTestId }: ZStackProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const ZStack: ({ children, className, dataTestId }: ZStackProps) => ReactElement;
@@ -1,4 +1,4 @@
1
- import { MouseEvent, ReactNode, Ref } from "react";
1
+ import { MouseEvent, ReactElement, ReactNode, Ref } from "react";
2
2
  import { Size } from "../../../common";
3
3
  import { ButtonCommonProps, ButtonType } from "../shared/ButtonProps";
4
4
  export interface ButtonProps extends Omit<ButtonCommonProps, "size"> {
@@ -57,6 +57,6 @@ export interface ButtonProps extends Omit<ButtonCommonProps, "size"> {
57
57
  * @returns {ReactElement} Button component
58
58
  */
59
59
  export declare const Button: {
60
- ({ onClick, children, loading, disabled, className, fullWidth, prefix, suffix, variant, type, size, square, dataTestId, title, role, tabIndex, asChild, circular, ref, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
60
+ ({ onClick, children, loading, disabled, className, fullWidth, prefix, suffix, variant, type, size, square, dataTestId, title, role, tabIndex, asChild, circular, ref, ...rest }: ButtonProps): ReactElement;
61
61
  displayName: string;
62
62
  };
@@ -1,7 +1,8 @@
1
- import { ComponentType, JSX, ReactNode, Ref } from "react";
1
+ import { MappedOmit } from "@trackunit/shared-utils";
2
+ import { ComponentType, JSX, ReactElement, ReactNode, Ref } from "react";
2
3
  import { Size } from "../../../common";
3
4
  import { ButtonCommonProps } from "../shared/ButtonProps";
4
- export interface IconButtonProps extends Omit<ButtonCommonProps, "size"> {
5
+ export interface IconButtonProps extends MappedOmit<ButtonCommonProps, "size"> {
5
6
  /**
6
7
  * The icon to display.
7
8
  */
@@ -28,6 +29,6 @@ export interface IconButtonProps extends Omit<ButtonCommonProps, "size"> {
28
29
  *
29
30
  */
30
31
  export declare const IconButton: {
31
- ({ icon, size, square, loading, disabled, className, ref, ...rest }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
32
+ ({ icon, size, square, loading, disabled, className, ref, ...rest }: IconButtonProps): ReactElement;
32
33
  displayName: string;
33
34
  };
@@ -1,4 +1,4 @@
1
- import { MouseEvent } from "react";
1
+ import { MouseEvent, ReactElement } from "react";
2
2
  interface StarButtonProps {
3
3
  starred: boolean;
4
4
  onClick: (e: MouseEvent) => void;
@@ -9,5 +9,5 @@ interface StarButtonProps {
9
9
  * @param {StarButtonProps} props - The props for the StarButton component
10
10
  * @returns {ReactElement} StarButton component
11
11
  */
12
- export declare const StarButton: ({ starred, onClick }: StarButtonProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const StarButton: ({ starred, onClick }: StarButtonProps) => ReactElement;
13
13
  export {};
@@ -17,6 +17,8 @@ export * from "./Icon/Icon";
17
17
  export * from "./Indicator";
18
18
  export * from "./KPI/KPI";
19
19
  export * from "./KPICard/KPICard";
20
+ export * from "./List/List";
21
+ export * from "./List/List.variants";
20
22
  export * from "./ListItem/ListItem";
21
23
  export * from "./Menu";
22
24
  export * from "./Notice";
@@ -44,7 +46,5 @@ export * from "./ToggleGroup/ToggleGroup";
44
46
  export * from "./ToggleGroup/ToggleGroup.variants";
45
47
  export * from "./Tooltip";
46
48
  export * from "./ValueBar";
47
- export * from "./VirtualizedList/VirtualizedList";
48
- export * from "./VirtualizedList/VirtualizedList.variants";
49
49
  export * from "./ZStack/ZStack";
50
50
  export * from "./ZStack/ZStack.variants";
@@ -17,6 +17,6 @@ export declare const useContinuousTimeout: ({ onTimeout, onMaxRetries, duration,
17
17
  startTimeouts: () => void;
18
18
  stopTimeouts: () => void;
19
19
  isRunning: boolean;
20
- readonly retries: number;
20
+ retries: number;
21
21
  };
22
22
  export {};
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * @returns {boolean} Returns true if it is the first render, false otherwise.
5
5
  */
6
- export declare const useSelfUpdatingRef: <TState>(initialState: TState) => import("react").RefObject<TState>;
6
+ export declare const useSelfUpdatingRef: <TState>(initialState: TState) => React.RefObject<TState>;