@trackunit/react-components 1.8.21 → 1.8.23
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 +182 -124
- package/index.esm.js +182 -124
- package/package.json +7 -7
- package/src/common/PackageNameStoryComponent.d.ts +2 -1
- package/src/components/Alert/Alert.d.ts +2 -2
- package/src/components/Badge/Badge.d.ts +2 -1
- package/src/components/Breadcrumb/Breadcrumb.d.ts +3 -2
- package/src/components/Breadcrumb/BreadcrumbForLargeScreen.d.ts +2 -1
- package/src/components/Breadcrumb/BreadcrumbForMediumScreen.d.ts +2 -1
- package/src/components/Breadcrumb/BreadcrumbForSmallScreen.d.ts +2 -1
- package/src/components/Breadcrumb/BreadcrumbItem.d.ts +2 -1
- package/src/components/Card/Card.d.ts +2 -2
- package/src/components/Card/CardBody.d.ts +2 -2
- package/src/components/Card/CardFooter.d.ts +2 -2
- package/src/components/Card/CardHeader.d.ts +3 -3
- package/src/components/Collapse/Collapse.d.ts +2 -2
- package/src/components/CompletionStatusIndicator/CompletionStatusIndicator.d.ts +2 -1
- package/src/components/CopyableText/CopyableText.d.ts +2 -1
- package/src/components/EmptyState/EmptyState.d.ts +2 -1
- package/src/components/Highlight/Highlight.d.ts +2 -2
- package/src/components/Icon/Icon.d.ts +2 -2
- package/src/components/InteractableItem/InteractableItem.variants.d.ts +2 -2
- package/src/components/KPICard/KPICard.d.ts +1 -1
- package/src/components/Menu/MenuDivider/MenuDivider.d.ts +2 -1
- package/src/components/Menu/MenuItem/MenuItem.d.ts +2 -2
- package/src/components/Menu/MenuItem/MenuItem.variants.d.ts +3 -2
- package/src/components/Menu/MoreMenu/MoreMenu.d.ts +2 -2
- package/src/components/Page/Page.d.ts +2 -2
- package/src/components/Page/PageContent.d.ts +2 -2
- package/src/components/PageHeader/components/PageHeaderKpiMetrics.d.ts +9 -1
- package/src/components/PageHeader/components/PageHeaderSecondaryActions.d.ts +17 -2
- package/src/components/PageHeader/components/PageHeaderTitle.d.ts +10 -1
- package/src/components/Pagination/Pagination.d.ts +2 -1
- package/src/components/Polygon/Polygon.d.ts +2 -1
- package/src/components/Popover/PopoverContent.d.ts +2 -2
- package/src/components/Popover/PopoverTitle.d.ts +2 -2
- package/src/components/Popover/PopoverTrigger.d.ts +2 -2
- package/src/components/Portal/Portal.d.ts +2 -1
- package/src/components/Sidebar/Sidebar.d.ts +1 -1
- package/src/components/Sidebar/useOverflowItems.d.ts +1 -1
- package/src/components/SkeletonLines/SkeletonLines.d.ts +2 -1
- package/src/components/Spacer/Spacer.d.ts +2 -1
- package/src/components/Spinner/Spinner.d.ts +2 -1
- package/src/components/Tabs/Tab.d.ts +1 -1
- package/src/components/Tabs/TabContent.d.ts +2 -2
- package/src/components/Tabs/TabList.d.ts +1 -1
- package/src/components/Tabs/Tabs.d.ts +2 -2
- package/src/components/Tag/Tag.d.ts +2 -2
- package/src/components/ToggleGroup/ToggleGroup.d.ts +3 -3
- package/src/components/ValueBar/ValueBar.d.ts +2 -1
- package/src/components/VirtualizedList/VirtualizedList.d.ts +1 -1
- package/src/components/ZStack/ZStack.d.ts +2 -2
- package/src/components/buttons/Button/Button.d.ts +2 -2
- package/src/components/buttons/IconButton/IconButton.d.ts +4 -3
- package/src/components/buttons/StarButton/StarButton.d.ts +2 -2
- package/src/hooks/useContinuousTimeout.d.ts +1 -1
- package/src/hooks/useSelfUpdatingRef.d.ts +1 -1
|
@@ -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):
|
|
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 &
|
|
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>) =>
|
|
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) =>
|
|
51
|
+
export declare const ValueBar: ({ value, min, max, unit, size, levelColors, valueColor, showValue, className, dataTestId, zeroScoreAllowed, }: ValueBarProps) => ReactElement;
|
|
51
52
|
export {};
|
|
@@ -30,5 +30,5 @@ export interface VirtualizedListProps extends CommonProps {
|
|
|
30
30
|
* @property {loadingIndicator} [loadingIndicator="spinner"] - The type of loading indicator in the list.
|
|
31
31
|
* @property {skeletonLinesHeight} [skeletonLinesHeight="2rem"] - The height of the skeleton lines.
|
|
32
32
|
*/
|
|
33
|
-
export declare const VirtualizedList: ({ count, rowHeight, pagination, children, className, dataTestId, separator, loadingIndicator, skeletonLinesHeight, onRowClick, scrollRef, }: VirtualizedListProps) =>
|
|
33
|
+
export declare const VirtualizedList: ({ count, rowHeight, pagination, children, className, dataTestId, separator, loadingIndicator, skeletonLinesHeight, onRowClick, scrollRef, }: VirtualizedListProps) => ReactElement;
|
|
34
34
|
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) =>
|
|
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):
|
|
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 {
|
|
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
|
|
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):
|
|
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) =>
|
|
12
|
+
export declare const StarButton: ({ starred, onClick }: StarButtonProps) => ReactElement;
|
|
13
13
|
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) =>
|
|
6
|
+
export declare const useSelfUpdatingRef: <TState>(initialState: TState) => React.RefObject<TState>;
|