@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.
- package/index.cjs.js +257 -205
- package/index.esm.js +256 -204
- 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/{VirtualizedList/VirtualizedList.d.ts → List/List.d.ts} +4 -4
- package/src/components/{VirtualizedList/VirtualizedList.variants.d.ts → List/List.variants.d.ts} +3 -3
- 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/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/components/index.d.ts +2 -2
- package/src/hooks/useContinuousTimeout.d.ts +1 -1
- package/src/hooks/useSelfUpdatingRef.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.24",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"@floating-ui/react": "^0.26.25",
|
|
18
18
|
"string-ts": "^2.0.0",
|
|
19
19
|
"tailwind-merge": "^2.0.0",
|
|
20
|
-
"@trackunit/ui-design-tokens": "1.6.
|
|
21
|
-
"@trackunit/css-class-variance-utilities": "1.6.
|
|
22
|
-
"@trackunit/shared-utils": "1.8.
|
|
23
|
-
"@trackunit/ui-icons": "1.6.
|
|
24
|
-
"@trackunit/react-table-pagination": "1.6.
|
|
25
|
-
"@trackunit/react-test-setup": "1.3.
|
|
20
|
+
"@trackunit/ui-design-tokens": "1.6.52",
|
|
21
|
+
"@trackunit/css-class-variance-utilities": "1.6.50",
|
|
22
|
+
"@trackunit/shared-utils": "1.8.50",
|
|
23
|
+
"@trackunit/ui-icons": "1.6.49",
|
|
24
|
+
"@trackunit/react-table-pagination": "1.6.49",
|
|
25
|
+
"@trackunit/react-test-setup": "1.3.50",
|
|
26
26
|
"@tanstack/react-router": "1.114.29"
|
|
27
27
|
},
|
|
28
28
|
"module": "./index.esm.js",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
interface PackageNameStoryComponentProps {
|
|
2
3
|
packageJSON?: {
|
|
3
4
|
name?: string;
|
|
@@ -7,5 +8,5 @@ interface PackageNameStoryComponentProps {
|
|
|
7
8
|
/**
|
|
8
9
|
* A component used to display the package name and version in the Storybook docs.
|
|
9
10
|
*/
|
|
10
|
-
export declare const PackageNameStoryComponent: ({ packageJSON }: PackageNameStoryComponentProps) =>
|
|
11
|
+
export declare const PackageNameStoryComponent: ({ packageJSON }: PackageNameStoryComponentProps) => ReactElement;
|
|
11
12
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IntentColors } from "@trackunit/ui-design-tokens";
|
|
2
|
-
import { ReactNode } from "react";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
3
3
|
import { CommonProps } from "../../common/CommonProps";
|
|
4
4
|
export type AlertActionType = "primary" | "secondary";
|
|
5
5
|
export type AlertAction = {
|
|
@@ -50,4 +50,4 @@ export interface AlertProps extends CommonProps {
|
|
|
50
50
|
* @param {AlertProps} props - The props for the Alert component
|
|
51
51
|
* @returns {ReactElement} Alert component
|
|
52
52
|
*/
|
|
53
|
-
export declare const Alert: ({ color, title, className, children, primaryAction, secondaryAction, onClose, dataTestId, autoScroll, actionsInline, }: AlertProps) =>
|
|
53
|
+
export declare const Alert: ({ color, title, className, children, primaryAction, secondaryAction, onClose, dataTestId, autoScroll, actionsInline, }: AlertProps) => ReactElement;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ThemeColors } from "@trackunit/ui-design-tokens";
|
|
2
|
+
import { ReactElement } from "react";
|
|
2
3
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
4
|
type BadgeColors = Extract<ThemeColors, "primary" | "danger" | "warning">;
|
|
4
5
|
interface BaseBadgeProps extends CommonProps {
|
|
@@ -42,5 +43,5 @@ export type BadgeProps = BaseBadgeProps;
|
|
|
42
43
|
* @param {BadgeProps} props - The props for the Badge component
|
|
43
44
|
* @returns {ReactElement} Badge component
|
|
44
45
|
*/
|
|
45
|
-
export declare const Badge: ({ color, compact, className, count, max, hideZero, dataTestId, }: BadgeProps) =>
|
|
46
|
+
export declare const Badge: ({ color, compact, className, count, max, hideZero, dataTestId, }: BadgeProps) => ReactElement | null;
|
|
46
47
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { BreadcrumbContainerProps, BreadcrumbProps } from "./utils/types";
|
|
2
3
|
/**
|
|
3
4
|
* The breadcrumb component shows a user's location in a website or application. Breadcrumbs are particularly useful when a large amount of content is organized in a hierarchical manner. They streamline navigation, minimize the steps required to revisit previous pages, and offer contextual insights to the users.
|
|
@@ -12,10 +13,10 @@ import { BreadcrumbContainerProps, BreadcrumbProps } from "./utils/types";
|
|
|
12
13
|
* @param {BreadcrumbProps} props - The props for the Breadcrumb component
|
|
13
14
|
* @returns {ReactElement} Breadcrumb component
|
|
14
15
|
*/
|
|
15
|
-
export declare const Breadcrumb: ({ className, dataTestId, breadcrumbItems, back }: BreadcrumbProps) =>
|
|
16
|
+
export declare const Breadcrumb: ({ className, dataTestId, breadcrumbItems, back }: BreadcrumbProps) => ReactElement;
|
|
16
17
|
/**
|
|
17
18
|
* BreadcrumbContainer is a helper component that renders the breadcrumb items based on the screen size.
|
|
18
19
|
*
|
|
19
20
|
* @param {BreadcrumbContainerProps} props - The props for the BreadcrumbContainer component
|
|
20
21
|
*/
|
|
21
|
-
export declare const BreadcrumbContainer: ({ dataTestId, breadcrumbItems }: BreadcrumbContainerProps) =>
|
|
22
|
+
export declare const BreadcrumbContainer: ({ dataTestId, breadcrumbItems }: BreadcrumbContainerProps) => ReactElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { BreadcrumbContainerProps } from "./utils/types";
|
|
2
3
|
/**
|
|
3
4
|
* BreadcrumbForLargeScreen is a helper component that renders the breadcrumb items for large screens.
|
|
4
5
|
*/
|
|
5
|
-
export declare const BreadcrumbForLargeScreen: ({ dataTestId, breadcrumbItems }: BreadcrumbContainerProps) =>
|
|
6
|
+
export declare const BreadcrumbForLargeScreen: ({ dataTestId, breadcrumbItems }: BreadcrumbContainerProps) => ReactElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { BreadcrumbContainerProps } from "./utils/types";
|
|
2
3
|
/**
|
|
3
4
|
* BreadcrumbForMediumScreen is a helper component that renders the breadcrumb items for medium screens.
|
|
4
5
|
*/
|
|
5
|
-
export declare const BreadcrumbForMediumScreen: ({ dataTestId, breadcrumbItems }: BreadcrumbContainerProps) =>
|
|
6
|
+
export declare const BreadcrumbForMediumScreen: ({ dataTestId, breadcrumbItems }: BreadcrumbContainerProps) => ReactElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { BreadcrumbContainerProps } from "./utils/types";
|
|
2
3
|
/**
|
|
3
4
|
* BreadcrumbForSmallScreen is a helper component that renders the breadcrumb items for small screens.
|
|
4
5
|
*/
|
|
5
|
-
export declare const BreadcrumbForSmallScreen: ({ dataTestId, breadcrumbItems }: BreadcrumbContainerProps) =>
|
|
6
|
+
export declare const BreadcrumbForSmallScreen: ({ dataTestId, breadcrumbItems }: BreadcrumbContainerProps) => ReactElement;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { BreadcrumbItemRenderProps } from "./utils/types";
|
|
2
3
|
/**
|
|
3
4
|
* BreadcrumbItem is a helper component that renders the individual breadcrumb item.
|
|
4
5
|
*/
|
|
5
|
-
export declare const BreadcrumbItem: ({ item, dataTestId }: BreadcrumbItemRenderProps) =>
|
|
6
|
+
export declare const BreadcrumbItem: ({ item, dataTestId }: BreadcrumbItemRenderProps) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputHTMLAttributes, MouseEventHandler, ReactNode } from "react";
|
|
1
|
+
import { InputHTMLAttributes, MouseEventHandler, ReactElement, ReactNode } from "react";
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
3
|
export declare const ROLE_CARD = "region";
|
|
4
4
|
export interface CardProps extends CommonProps, InputHTMLAttributes<HTMLDivElement> {
|
|
@@ -30,4 +30,4 @@ export interface CardProps extends CommonProps, InputHTMLAttributes<HTMLDivEleme
|
|
|
30
30
|
* @param {CardProps} props - The props for the Card component
|
|
31
31
|
* @returns {ReactElement} Card component
|
|
32
32
|
*/
|
|
33
|
-
export declare const Card: ({ children, onClick, fullHeight, onMouseEnter, onMouseLeave, className, dataTestId, ...rest }: CardProps) =>
|
|
33
|
+
export declare const Card: ({ children, onClick, fullHeight, onMouseEnter, onMouseLeave, className, dataTestId, ...rest }: CardProps) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
2
|
import { CommonProps, Density } from "../../common";
|
|
3
3
|
export interface CardBodyProps extends CommonProps {
|
|
4
4
|
/**
|
|
@@ -30,4 +30,4 @@ export interface CardBodyProps extends CommonProps {
|
|
|
30
30
|
* @param {CardBodyProps} props - The props for the CardBody component
|
|
31
31
|
* @returns {ReactElement} CardBody component
|
|
32
32
|
*/
|
|
33
|
-
export declare const CardBody: ({ density, children, dataTestId, className, direction, disableGap, id, }: CardBodyProps) =>
|
|
33
|
+
export declare const CardBody: ({ density, children, dataTestId, className, direction, disableGap, id, }: CardBodyProps) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
2
|
import { CommonProps, Density } from "../../common";
|
|
3
3
|
export interface CardFooterProps extends CommonProps {
|
|
4
4
|
/**
|
|
@@ -22,4 +22,4 @@ export interface CardFooterProps extends CommonProps {
|
|
|
22
22
|
* @param {CardFooterProps} props - The props for the CardFooter component
|
|
23
23
|
* @returns {ReactElement} CardFooter component
|
|
24
24
|
*/
|
|
25
|
-
export declare const CardFooter: ({ dataTestId, className, children, density, hideSeparator }: CardFooterProps) =>
|
|
25
|
+
export declare const CardFooter: ({ dataTestId, className, children, density, hideSeparator, }: CardFooterProps) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
2
|
import { CommonProps, Density } from "../../common";
|
|
3
3
|
import { HeadingVariant } from "../Heading/Heading";
|
|
4
4
|
export interface CardHeaderProps extends CommonProps {
|
|
@@ -14,7 +14,7 @@ export interface CardHeaderProps extends CommonProps {
|
|
|
14
14
|
*/
|
|
15
15
|
headingVariant?: HeadingVariant;
|
|
16
16
|
/** Adds an extra heading below the main heading. */
|
|
17
|
-
subHeading?:
|
|
17
|
+
subHeading?: ReactNode;
|
|
18
18
|
/**
|
|
19
19
|
* Items to render next to the heading
|
|
20
20
|
*/
|
|
@@ -44,4 +44,4 @@ export interface CardHeaderProps extends CommonProps {
|
|
|
44
44
|
* @param {CardHeaderProps} props - The props for the CardHeader component
|
|
45
45
|
* @returns {ReactElement} CardHeader component
|
|
46
46
|
*/
|
|
47
|
-
export declare const CardHeader: ({ heading, headingVariant, subHeading, onClose, dataTestId, className, children, accessories, actions, density, hideSeparator, }: CardHeaderProps) =>
|
|
47
|
+
export declare const CardHeader: ({ heading, headingVariant, subHeading, onClose, dataTestId, className, children, accessories, actions, density, hideSeparator, }: CardHeaderProps) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MouseEvent, ReactNode } from "react";
|
|
1
|
+
import { MouseEvent, ReactElement, ReactNode } from "react";
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
3
|
export interface CollapseProps extends CommonProps {
|
|
4
4
|
id: string;
|
|
@@ -50,4 +50,4 @@ export interface CollapseProps extends CommonProps {
|
|
|
50
50
|
* @param {CollapseProps} props - The props for the Collapse component
|
|
51
51
|
* @returns {ReactElement} Collapse component
|
|
52
52
|
*/
|
|
53
|
-
export declare const Collapse: ({ id, initialExpanded, onToggle, label, children, className, headerClassName, headerAddon, dataTestId, animate, extraPadding, }: CollapseProps) =>
|
|
53
|
+
export declare const Collapse: ({ id, initialExpanded, onToggle, label, children, className, headerClassName, headerAddon, dataTestId, animate, extraPadding, }: CollapseProps) => ReactElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
2
3
|
export interface CompletionStatusIndicatorProps extends CommonProps {
|
|
3
4
|
loading: boolean;
|
|
@@ -17,4 +18,4 @@ export interface CompletionStatusIndicatorProps extends CommonProps {
|
|
|
17
18
|
* @param {boolean} props.warning - Indicates if the process has a warning.
|
|
18
19
|
* @param {boolean} props.success - Indicates if the process was successful.
|
|
19
20
|
*/
|
|
20
|
-
export declare const CompletionStatusIndicator: ({ loading, error, success, ...rest }: CompletionStatusIndicatorProps) =>
|
|
21
|
+
export declare const CompletionStatusIndicator: ({ loading, error, success, ...rest }: CompletionStatusIndicatorProps) => ReactElement | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { CommonProps } from "../../common";
|
|
2
3
|
export interface CopyableTextProps extends CommonProps {
|
|
3
4
|
/**
|
|
@@ -17,4 +18,4 @@ export interface CopyableTextProps extends CommonProps {
|
|
|
17
18
|
* @param {CopyableTextProps} props - The props for the CopyableText component
|
|
18
19
|
* @returns {ReactElement} CopyableText component
|
|
19
20
|
*/
|
|
20
|
-
export declare const CopyableText: ({ text, alternativeText, dataTestId, className }: CopyableTextProps) =>
|
|
21
|
+
export declare const CopyableText: ({ text, alternativeText, dataTestId, className }: CopyableTextProps) => ReactElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { CommonProps } from "../../common";
|
|
2
3
|
type EmptyStateImage = "WORKER_WITH_SIGN" | "ROAD_BLOCK" | "BUILDING_ERROR" | "WALL_CONSTRUCTION" | "PHONE_LOCK_SECURITY" | "SEARCH_DOCUMENT";
|
|
3
4
|
type EmptyStateButtonAction = {
|
|
@@ -30,5 +31,5 @@ export interface EmptyStateProps extends CommonProps {
|
|
|
30
31
|
* - For guidance purposes (e.g., onboarding, adjusting filters, exploring alternative approaches).
|
|
31
32
|
* - In celebratory instances (e.g., no new notifications, services up to date).
|
|
32
33
|
*/
|
|
33
|
-
export declare const EmptyState: ({ description, altText, image, customImageSrc, loading, dataTestId, className, primaryAction, secondaryAction, additionalHelpAction, }: EmptyStateProps) =>
|
|
34
|
+
export declare const EmptyState: ({ description, altText, image, customImageSrc, loading, dataTestId, className, primaryAction, secondaryAction, additionalHelpAction, }: EmptyStateProps) => ReactElement;
|
|
34
35
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, Ref } from "react";
|
|
1
|
+
import { ReactElement, ReactNode, Ref } from "react";
|
|
2
2
|
import { CommonProps, Size } from "../../common";
|
|
3
3
|
export type HighlightSize = Extract<Size, "small" | "medium">;
|
|
4
4
|
export interface HighlightProps extends CommonProps {
|
|
@@ -31,6 +31,6 @@ export interface HighlightProps extends CommonProps {
|
|
|
31
31
|
* @returns {ReactElement} highlight component
|
|
32
32
|
*/
|
|
33
33
|
export declare const Highlight: {
|
|
34
|
-
({ className, dataTestId, children, size, color, ref, }: HighlightProps):
|
|
34
|
+
({ className, dataTestId, children, size, color, ref, }: HighlightProps): ReactElement;
|
|
35
35
|
displayName: string;
|
|
36
36
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
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 } from "react";
|
|
3
|
+
import { CSSProperties, ReactElement } from "react";
|
|
4
4
|
import { CommonProps, Size } from "../../common";
|
|
5
5
|
import { AriaProps } from "../../common/AriaProps";
|
|
6
6
|
export type IconColors = IntentColors | GeneralColors | CriticalityColors | ActivityColors | UtilizationColors | SitesColors | RentalStatusColors;
|
|
@@ -318,5 +318,5 @@ export type IconProps = DiscriminatedIconProps & CommonProps & AriaProps & {
|
|
|
318
318
|
* @param {IconProps} props - The props for the Icon component
|
|
319
319
|
* @returns {ReactElement} Icon component
|
|
320
320
|
*/
|
|
321
|
-
export declare const Icon: ({ name, size, className, dataTestId, color, onClick, type, style, forwardedRef, ariaLabel, fontSize, ariaLabelledBy, ariaDescribedBy, ariaHidden, }: IconProps) =>
|
|
321
|
+
export declare const Icon: ({ name, size, className, dataTestId, color, onClick, type, style, forwardedRef, ariaLabel, fontSize, ariaLabelledBy, ariaDescribedBy, ariaHidden, }: IconProps) => ReactElement;
|
|
322
322
|
export {};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const cvaInteractableItem: (props?: ({
|
|
16
16
|
cursor?: "default" | "pointer" | "auto" | "help" | "zoom-in" | "zoom-out" | "not-allowed" | null | undefined;
|
|
17
|
-
|
|
17
|
+
selection?: "auto" | "selected" | "unselected" | null | undefined;
|
|
18
18
|
disabled?: boolean | null | undefined;
|
|
19
|
-
|
|
19
|
+
focus?: "auto" | "focused" | "unfocused" | null | undefined;
|
|
20
20
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -30,4 +30,4 @@ export interface KPICardProps extends MappedOmit<KPIProps, "variant"> {
|
|
|
30
30
|
* @param {KPICardProps} props - The props for the KPICard component
|
|
31
31
|
* @returns {ReactElement} KPICard component
|
|
32
32
|
*/
|
|
33
|
-
export declare const KPICard: ({ isActive, onClick, className, dataTestId, children, iconName, iconColor, ...rest }: KPICardProps) => ReactElement;
|
|
33
|
+
export declare const KPICard: ({ isActive, onClick, className, dataTestId, children, iconName, iconColor, loading, ...rest }: KPICardProps) => ReactElement;
|
|
@@ -2,10 +2,10 @@ import { VariantProps } from "@trackunit/css-class-variance-utilities";
|
|
|
2
2
|
import { RelayPagination } from "@trackunit/react-table-pagination";
|
|
3
3
|
import { ReactElement, RefObject } from "react";
|
|
4
4
|
import { CommonProps } from "../../common/CommonProps";
|
|
5
|
-
import {
|
|
6
|
-
type Separator = NonNullable<VariantProps<typeof
|
|
5
|
+
import { cvaListItem } from "./List.variants";
|
|
6
|
+
type Separator = NonNullable<VariantProps<typeof cvaListItem>["separator"]>;
|
|
7
7
|
type LoadingIndicator = "spinner" | "skeletonLines";
|
|
8
|
-
export interface
|
|
8
|
+
export interface ListProps extends CommonProps {
|
|
9
9
|
count: number;
|
|
10
10
|
rowHeight?: number;
|
|
11
11
|
pagination?: RelayPagination;
|
|
@@ -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
|
|
33
|
+
export declare const List: ({ count, rowHeight, pagination, children, className, dataTestId, separator, loadingIndicator, skeletonLinesHeight, onRowClick, scrollRef, }: ListProps) => ReactElement;
|
|
34
34
|
export {};
|
package/src/components/{VirtualizedList/VirtualizedList.variants.d.ts → List/List.variants.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const cvaListContainer: (props?: ({
|
|
2
2
|
parentControlledScrollable?: boolean | null | undefined;
|
|
3
3
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
4
|
+
export declare const cvaList: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
5
|
+
export declare const cvaListItem: (props?: ({
|
|
6
6
|
separator?: "alternating" | "line" | "none" | "space" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from "@trackunit/css-class-variance-utilities";
|
|
2
|
-
import { MouseEventHandler, ReactNode } from "react";
|
|
2
|
+
import { MouseEventHandler, ReactElement, ReactNode } from "react";
|
|
3
3
|
import { CommonProps } from "../../../common";
|
|
4
4
|
import { cvaMenuItemStyle } from "./MenuItem.variants";
|
|
5
5
|
export type MenuItemVariant = "primary" | "danger";
|
|
@@ -90,4 +90,4 @@ export interface MenuItemProps extends CommonProps {
|
|
|
90
90
|
* @param {MenuItemProps} props - The props for the MenuItem component
|
|
91
91
|
* @returns {ReactElement} MenuItem component
|
|
92
92
|
*/
|
|
93
|
-
export declare const MenuItem: ({ className, dataTestId, label, children, selected, focused, prefix, suffix, disabled, onClick, stopPropagation, id, tabIndex, optionLabelDescription, optionPrefix, fieldSize, variant, }: MenuItemProps) =>
|
|
93
|
+
export declare const MenuItem: ({ className, dataTestId, label, children, selected, focused, prefix, suffix, disabled, onClick, stopPropagation, id, tabIndex, optionLabelDescription, optionPrefix, fieldSize, variant, }: MenuItemProps) => ReactElement;
|
|
@@ -2,9 +2,10 @@ import { type VariantProps } from "@trackunit/css-class-variance-utilities";
|
|
|
2
2
|
import { MappedOmit } from "@trackunit/shared-utils";
|
|
3
3
|
import { cvaInteractableItem } from "../../InteractableItem/InteractableItem.variants";
|
|
4
4
|
import { MenuItemVariant } from "./MenuItem";
|
|
5
|
-
type CvaMenuItemProps = Partial<MappedOmit<VariantProps<typeof cvaInteractableItem>, "cursor">> & {
|
|
5
|
+
type CvaMenuItemProps = Partial<MappedOmit<VariantProps<typeof cvaInteractableItem>, "cursor" | "focus" | "selection">> & {
|
|
6
6
|
variant?: MenuItemVariant;
|
|
7
|
-
selected: boolean |
|
|
7
|
+
selected: boolean | undefined;
|
|
8
|
+
focused: boolean | undefined;
|
|
8
9
|
fieldSize?: VariantProps<typeof cvaMenuItemStyle>["fieldSize"];
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MakePropertyOptional, MappedOmit } from "@trackunit/shared-utils";
|
|
2
|
-
import { ReactNode } from "react";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
3
3
|
import { CommonProps } from "../../../common/CommonProps";
|
|
4
4
|
import { IconProps } from "../../Icon/Icon";
|
|
5
5
|
import { PopoverContentChildren, PopoverProps } from "../../Popover";
|
|
@@ -22,5 +22,5 @@ export interface MoreMenuProps extends CommonProps {
|
|
|
22
22
|
* @param {MoreMenuProps} props - The props for the MoreMenu component
|
|
23
23
|
* @returns {ReactElement} MoreMenu component
|
|
24
24
|
*/
|
|
25
|
-
export declare const MoreMenu: ({ className, dataTestId, popoverProps, iconProps, iconButtonProps, customButton, customPortalId, children, }: MoreMenuProps) =>
|
|
25
|
+
export declare const MoreMenu: ({ className, dataTestId, popoverProps, iconProps, iconButtonProps, customButton, customPortalId, children, }: MoreMenuProps) => ReactElement;
|
|
26
26
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from "@trackunit/css-class-variance-utilities";
|
|
2
|
-
import { ReactNode } from "react";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
3
3
|
import { CommonProps } from "../../common";
|
|
4
4
|
import { cvaPage } from "./Page.variants";
|
|
5
5
|
/**
|
|
@@ -17,4 +17,4 @@ export interface PageProps extends CommonProps {
|
|
|
17
17
|
/**
|
|
18
18
|
* Renders the page component. Adds padding and layout to the page.
|
|
19
19
|
*/
|
|
20
|
-
export declare const Page: ({ layout, className, children, dataTestId }: PageProps) =>
|
|
20
|
+
export declare const Page: ({ layout, className, children, dataTestId }: PageProps) => ReactElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from "@trackunit/css-class-variance-utilities";
|
|
2
|
-
import { ReactNode } from "react";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
3
3
|
import { CommonProps } from "../../common";
|
|
4
4
|
import { cvaPageContent } from "./Page.variants";
|
|
5
5
|
/**
|
|
@@ -20,5 +20,5 @@ interface PageContentProps extends CommonProps {
|
|
|
20
20
|
* @param {PageContentProps} props - The component props.
|
|
21
21
|
* @returns {ReactNode} - The rendered component.
|
|
22
22
|
*/
|
|
23
|
-
export declare const PageContent: ({ className, children, dataTestId, layout }: PageContentProps) =>
|
|
23
|
+
export declare const PageContent: ({ className, children, dataTestId, layout }: PageContentProps) => ReactElement;
|
|
24
24
|
export {};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { PageHeaderKpiMetricsType } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* The PageHeaderKpiMetrics component is used to render the KPI metrics in the PageHeader component.
|
|
5
|
+
*
|
|
6
|
+
* @param {object} props - The props for the PageHeaderKpiMetrics component
|
|
7
|
+
* @param {Array<PageHeaderKpiMetricsType>} props.kpiMetrics - The KPI metrics to render
|
|
8
|
+
* @returns {ReactElement} PageHeaderKpiMetrics component
|
|
9
|
+
*/
|
|
2
10
|
export declare const PageHeaderKpiMetrics: ({ kpiMetrics }: {
|
|
3
11
|
kpiMetrics: Array<PageHeaderKpiMetricsType>;
|
|
4
|
-
}) =>
|
|
12
|
+
}) => ReactElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { PageHeaderSecondaryActionType } from "../types";
|
|
2
3
|
type ActionRendererProps = {
|
|
3
4
|
action: PageHeaderSecondaryActionType;
|
|
@@ -12,9 +13,23 @@ type ActionRendererProps = {
|
|
|
12
13
|
*/
|
|
13
14
|
externalOnClick?: () => void;
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The ActionRenderer component is used to render the action in the PageHeaderSecondaryActions component.
|
|
18
|
+
*
|
|
19
|
+
* @param {ActionRendererProps} props - The props for the ActionRenderer component
|
|
20
|
+
* @returns {ReactElement} ActionRenderer component
|
|
21
|
+
*/
|
|
22
|
+
export declare function ActionRenderer({ action, isMenuItem, externalOnClick }: ActionRendererProps): ReactElement;
|
|
23
|
+
/**
|
|
24
|
+
* The PageHeaderSecondaryActions component is used to render the secondary actions in the PageHeader component.
|
|
25
|
+
*
|
|
26
|
+
* @param {object} props - The props for the PageHeaderSecondaryActions component
|
|
27
|
+
* @param {Array<PageHeaderSecondaryActionType>} props.actions - The secondary actions to render
|
|
28
|
+
* @param {boolean} [props.hasPrimaryAction] - Whether there is a primary action present
|
|
29
|
+
* @returns {ReactElement} PageHeaderSecondaryActions component
|
|
30
|
+
*/
|
|
16
31
|
export declare const PageHeaderSecondaryActions: ({ actions, hasPrimaryAction, }: {
|
|
17
32
|
actions: Array<PageHeaderSecondaryActionType>;
|
|
18
33
|
hasPrimaryAction?: boolean;
|
|
19
|
-
}) =>
|
|
34
|
+
}) => ReactElement;
|
|
20
35
|
export {};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The PageHeaderTitle component is used to display the title of the page header.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} props - The props for the PageHeaderTitle component
|
|
6
|
+
* @param {string} props.title - The title of the page header
|
|
7
|
+
* @param {string} [props.dataTestId] - The data test id of the page header title
|
|
8
|
+
* @returns {ReactElement} PageHeaderTitle component
|
|
9
|
+
*/
|
|
1
10
|
export declare const PageHeaderTitle: ({ title, dataTestId }: {
|
|
2
11
|
title: string;
|
|
3
12
|
dataTestId?: string;
|
|
4
|
-
}) =>
|
|
13
|
+
}) => ReactElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
export interface PaginationProps {
|
|
2
3
|
/**
|
|
3
4
|
* A go to previous page handler
|
|
@@ -58,4 +59,4 @@ export interface PaginationProps {
|
|
|
58
59
|
* @param {PaginationProps} props - The props for the Pagination component
|
|
59
60
|
* @returns {ReactElement} Pagination component
|
|
60
61
|
*/
|
|
61
|
-
export declare const Pagination: ({ previousPage, nextPage, canPreviousPage, canNextPage, pageCount, pageIndex, loading, className, dataTestId, getTranslatedCount, onPageChange, cursorBase, }: PaginationProps) =>
|
|
62
|
+
export declare const Pagination: ({ previousPage, nextPage, canPreviousPage, canNextPage, pageCount, pageIndex, loading, className, dataTestId, getTranslatedCount, onPageChange, cursorBase, }: PaginationProps) => ReactElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
2
3
|
type Point = [number, number];
|
|
3
4
|
export interface PolygonProps extends CommonProps {
|
|
@@ -12,5 +13,5 @@ export interface PolygonProps extends CommonProps {
|
|
|
12
13
|
* @param { PolygonProps} props - The props for the Polygon component
|
|
13
14
|
* @returns {ReactElement} Polygon component
|
|
14
15
|
*/
|
|
15
|
-
export declare const Polygon: ({ points, size, color, opaque, className, dataTestId }: PolygonProps) =>
|
|
16
|
+
export declare const Polygon: ({ points, size, color, opaque, className, dataTestId, }: PolygonProps) => ReactElement;
|
|
16
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLProps, ReactNode, Ref } from "react";
|
|
1
|
+
import { HTMLProps, ReactElement, ReactNode, Ref } from "react";
|
|
2
2
|
import { CommonProps } from "../../common";
|
|
3
3
|
export type PopoverContentChildren = ((close: () => void) => ReactNode) | ReactNode;
|
|
4
4
|
export interface PopoverContentProps extends Omit<HTMLProps<HTMLDivElement>, "children">, CommonProps {
|
|
@@ -15,4 +15,4 @@ export interface PopoverContentProps extends Omit<HTMLProps<HTMLDivElement>, "ch
|
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
18
|
-
export declare const PopoverContent: ({ className, dataTestId, children, portalId, ref: propRef, ...props }: PopoverContentProps) =>
|
|
18
|
+
export declare const PopoverContent: ({ className, dataTestId, children, portalId, ref: propRef, ...props }: PopoverContentProps) => ReactElement;
|
|
@@ -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 interface PopoverTitleProps extends CommonProps {
|
|
4
4
|
action?: ReactNode;
|
|
@@ -17,4 +17,4 @@ export interface PopoverTitleProps extends CommonProps {
|
|
|
17
17
|
* @param {PopoverTitleProps} props - The props for the PopoverTitle component
|
|
18
18
|
* @returns {ReactElement} PopoverTitle component
|
|
19
19
|
*/
|
|
20
|
-
export declare const PopoverTitle: ({ children, action, divider, className, dataTestId }: PopoverTitleProps) =>
|
|
20
|
+
export declare const PopoverTitle: ({ children, action, divider, className, dataTestId, }: PopoverTitleProps) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLProps, ReactNode, Ref } from "react";
|
|
1
|
+
import { HTMLProps, ReactElement, ReactNode, Ref } from "react";
|
|
2
2
|
interface PopoverTriggerProps extends HTMLProps<HTMLElement> {
|
|
3
3
|
/**
|
|
4
4
|
* When enabled the trigger will be rendered as a button
|
|
@@ -17,5 +17,5 @@ interface PopoverTriggerProps extends HTMLProps<HTMLElement> {
|
|
|
17
17
|
* @param {PopoverTriggerProps} props - The props for the PopoverTrigger component
|
|
18
18
|
* @returns {ReactElement} PopoverTrigger component
|
|
19
19
|
*/
|
|
20
|
-
export declare const PopoverTrigger: ({ children, renderButton, ref: propRef, ...props }: PopoverTriggerProps) =>
|
|
20
|
+
export declare const PopoverTrigger: ({ children, renderButton, ref: propRef, ...props }: PopoverTriggerProps) => ReactElement;
|
|
21
21
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FloatingPortalProps } from "@floating-ui/react";
|
|
2
|
+
import { ReactElement } from "react";
|
|
2
3
|
export type PortalProps = FloatingPortalProps;
|
|
3
4
|
/**
|
|
4
5
|
* Portals the floating element into a given container element
|
|
@@ -6,4 +7,4 @@ export type PortalProps = FloatingPortalProps;
|
|
|
6
7
|
* document body -> div#portal-container.
|
|
7
8
|
* alongside other portalled elements.
|
|
8
9
|
*/
|
|
9
|
-
export declare const Portal: (props: FloatingPortalProps) =>
|
|
10
|
+
export declare const Portal: (props: FloatingPortalProps) => ReactElement;
|
|
@@ -54,4 +54,4 @@ export interface SidebarProps extends CommonProps {
|
|
|
54
54
|
* @param {SidebarProps} props - The props for the Sidebar component
|
|
55
55
|
* @returns {ReactElement} Sidebar component
|
|
56
56
|
*/
|
|
57
|
-
export declare const Sidebar: ({ childContainerClassName, children, breakpoint, className, dataTestId, moreMenuProps, menuListProps, overflowThreshold, }: SidebarProps) =>
|
|
57
|
+
export declare const Sidebar: ({ childContainerClassName, children, breakpoint, className, dataTestId, moreMenuProps, menuListProps, overflowThreshold, }: SidebarProps) => ReactElement;
|
|
@@ -34,6 +34,6 @@ export type OverflowMap = {
|
|
|
34
34
|
* @returns {object} The overflow items and the ref to the container.
|
|
35
35
|
*/
|
|
36
36
|
export declare const useOverflowItems: ({ threshold, childUniqueIdentifierAttribute, children, }: OverflowItemsOptions) => {
|
|
37
|
-
overflowContainerRef:
|
|
37
|
+
overflowContainerRef: React.RefObject<HTMLDivElement | null>;
|
|
38
38
|
itemOverflowMap: OverflowMap;
|
|
39
39
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
2
3
|
export interface SkeletonLinesProps extends CommonProps {
|
|
3
4
|
/**
|
|
@@ -20,4 +21,4 @@ export interface SkeletonLinesProps extends CommonProps {
|
|
|
20
21
|
/**
|
|
21
22
|
* Display placeholder lines before the data gets loaded to reduce load-time frustration.
|
|
22
23
|
*/
|
|
23
|
-
export declare const SkeletonLines: import("react").MemoExoticComponent<({ margin, lines, height, width, className, dataTestId }: SkeletonLinesProps) =>
|
|
24
|
+
export declare const SkeletonLines: import("react").MemoExoticComponent<({ margin, lines, height, width, className, dataTestId, }: SkeletonLinesProps) => ReactElement>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { CommonProps, Size } from "../../common";
|
|
2
3
|
export interface SpacerProps extends CommonProps {
|
|
3
4
|
/**
|
|
@@ -16,4 +17,4 @@ export interface SpacerProps extends CommonProps {
|
|
|
16
17
|
* @param {SpacerProps} props - The props for the Spacer component
|
|
17
18
|
* @returns {ReactElement} Spacer component
|
|
18
19
|
*/
|
|
19
|
-
export declare const Spacer: ({ size, border, dataTestId, className }: SpacerProps) =>
|
|
20
|
+
export declare const Spacer: ({ size, border, dataTestId, className }: SpacerProps) => ReactElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
2
3
|
import { Size } from "../../common/Size";
|
|
3
4
|
type Centering = "horizontally" | "vertically" | "centered";
|
|
@@ -39,5 +40,5 @@ export interface SpinnerProps extends CommonProps {
|
|
|
39
40
|
* @param {SpinnerProps} props - The props for the Spinner component
|
|
40
41
|
* @returns {ReactElement} Spinner component
|
|
41
42
|
*/
|
|
42
|
-
export declare const Spinner: ({ mode, size, centering, className, containerClassName, dataTestId, label, }: SpinnerProps) =>
|
|
43
|
+
export declare const Spinner: ({ mode, size, centering, className, containerClassName, dataTestId, label, }: SpinnerProps) => ReactElement;
|
|
43
44
|
export {};
|
|
@@ -43,4 +43,4 @@ export interface TabProps extends TabsTriggerProps {
|
|
|
43
43
|
* Wrapper for radix tab component.
|
|
44
44
|
* We add a custom implementation of the asChild prop to make it easy to make the child element look like other tabs.
|
|
45
45
|
*/
|
|
46
|
-
export declare const Tab: ({ value, isFullWidth, iconName, dataTestId, className, children, suffix, asChild, appendTabStylesToChildIfAsChild, ...rest }: TabProps) =>
|
|
46
|
+
export declare const Tab: ({ value, isFullWidth, iconName, dataTestId, className, children, suffix, asChild, appendTabStylesToChildIfAsChild, ...rest }: TabProps) => ReactElement;
|