@trackunit/react-components 1.4.170 → 1.4.172
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/package.json +7 -7
- package/src/components/Breadcrumb/utils/types.d.ts +2 -2
- package/src/components/Breadcrumb/utils/useBreadcrumbItemsToRender.d.ts +1 -1
- package/src/components/Menu/MenuList/MenuList.d.ts +2 -2
- package/src/components/PageHeader/components/PageHeaderKpiMetrics.d.ts +1 -1
- package/src/components/PageHeader/components/PageHeaderSecondaryActions.d.ts +1 -1
- package/src/components/PageHeader/types.d.ts +2 -2
- package/src/components/Polygon/Polygon.d.ts +1 -1
- package/src/components/Sidebar/Sidebar.d.ts +1 -1
- package/src/components/Sidebar/useOverflowItems.d.ts +2 -2
- package/src/components/SkeletonLines/SkeletonLines.d.ts +2 -2
- package/src/components/Tabs/TabList.d.ts +1 -1
- package/src/components/ToggleGroup/ToggleGroup.d.ts +1 -1
- package/src/hooks/useClickOutside.d.ts +1 -1
- package/src/hooks/useModifierKey.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.172",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"@tanstack/react-router": "1.114.29",
|
|
19
19
|
"string-ts": "^2.0.0",
|
|
20
20
|
"tailwind-merge": "^2.0.0",
|
|
21
|
-
"@trackunit/ui-design-tokens": "1.3.
|
|
22
|
-
"@trackunit/css-class-variance-utilities": "1.3.
|
|
23
|
-
"@trackunit/shared-utils": "1.5.
|
|
24
|
-
"@trackunit/ui-icons": "1.3.
|
|
25
|
-
"@trackunit/react-table-pagination": "1.3.
|
|
26
|
-
"@trackunit/react-test-setup": "1.0.
|
|
21
|
+
"@trackunit/ui-design-tokens": "1.3.139",
|
|
22
|
+
"@trackunit/css-class-variance-utilities": "1.3.141",
|
|
23
|
+
"@trackunit/shared-utils": "1.5.141",
|
|
24
|
+
"@trackunit/ui-icons": "1.3.141",
|
|
25
|
+
"@trackunit/react-table-pagination": "1.3.141",
|
|
26
|
+
"@trackunit/react-test-setup": "1.0.31"
|
|
27
27
|
},
|
|
28
28
|
"module": "./index.esm.js",
|
|
29
29
|
"main": "./index.cjs.js",
|
|
@@ -4,11 +4,11 @@ export interface BreadcrumbItemProps {
|
|
|
4
4
|
to: string;
|
|
5
5
|
}
|
|
6
6
|
export interface BreadcrumbProps extends CommonProps {
|
|
7
|
-
breadcrumbItems: BreadcrumbItemProps
|
|
7
|
+
breadcrumbItems: Array<BreadcrumbItemProps>;
|
|
8
8
|
back: () => void;
|
|
9
9
|
}
|
|
10
10
|
export interface BreadcrumbContainerProps extends CommonProps {
|
|
11
|
-
breadcrumbItems: React.ReactElement<BreadcrumbItemProps
|
|
11
|
+
breadcrumbItems: Array<React.ReactElement<BreadcrumbItemProps>>;
|
|
12
12
|
}
|
|
13
13
|
export interface BreadcrumbItemRenderProps extends CommonProps {
|
|
14
14
|
item: React.ReactElement<BreadcrumbItemProps>;
|
|
@@ -2,4 +2,4 @@ import { BreadcrumbItemProps } from "./types";
|
|
|
2
2
|
/**
|
|
3
3
|
* useBreadcrumbItemsToRender is a custom hook that takes an array of BreadcrumbItemProps and returns an array of React.ReactElement
|
|
4
4
|
*/
|
|
5
|
-
export declare const useBreadcrumbItemsToRender: (breadcrumbItems: BreadcrumbItemProps
|
|
5
|
+
export declare const useBreadcrumbItemsToRender: (breadcrumbItems: Array<BreadcrumbItemProps>) => Array<React.ReactElement<BreadcrumbItemProps>>;
|
|
@@ -22,11 +22,11 @@ export interface MenuListProps extends CommonProps {
|
|
|
22
22
|
/**
|
|
23
23
|
* Array of IDs representing the currently selected items.
|
|
24
24
|
*/
|
|
25
|
-
selectedItems?: string
|
|
25
|
+
selectedItems?: Array<string>;
|
|
26
26
|
/**
|
|
27
27
|
* Callback triggered when selected items change.
|
|
28
28
|
*/
|
|
29
|
-
onSelectionChange?: (selected: string
|
|
29
|
+
onSelectionChange?: (selected: Array<string>) => void;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* The MenuList is a popover menu that appears above all other content on the page. The menu offers a list of actions or functions that a user can access by clicking on a trigger.
|
|
@@ -14,7 +14,7 @@ type ActionRendererProps = {
|
|
|
14
14
|
};
|
|
15
15
|
export declare function ActionRenderer({ action, isMenuItem, externalOnClick }: ActionRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export declare const PageHeaderSecondaryActions: ({ actions, hasPrimaryAction, }: {
|
|
17
|
-
actions: PageHeaderSecondaryActionType
|
|
17
|
+
actions: Array<PageHeaderSecondaryActionType>;
|
|
18
18
|
hasPrimaryAction?: boolean;
|
|
19
19
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -72,12 +72,12 @@ interface BasePageHeaderProps extends CommonProps {
|
|
|
72
72
|
tabsList?: ReactElement<TabListProps>;
|
|
73
73
|
}
|
|
74
74
|
interface WithActions {
|
|
75
|
-
secondaryActions?: PageHeaderSecondaryActionType
|
|
75
|
+
secondaryActions?: Array<PageHeaderSecondaryActionType> | ReactNode;
|
|
76
76
|
kpiMetrics?: never;
|
|
77
77
|
}
|
|
78
78
|
interface WithKpiMetrics {
|
|
79
79
|
secondaryActions?: never;
|
|
80
|
-
kpiMetrics?: PageHeaderKpiMetricsType
|
|
80
|
+
kpiMetrics?: Array<PageHeaderKpiMetricsType>;
|
|
81
81
|
}
|
|
82
82
|
export type PageHeaderProps = BasePageHeaderProps & (WithActions | WithKpiMetrics);
|
|
83
83
|
export {};
|
|
@@ -28,7 +28,7 @@ export interface SidebarProps extends CommonProps {
|
|
|
28
28
|
*
|
|
29
29
|
* **For the overflow functionality to take effect use _"min-w-[*]"_ or _"flex-shrink-0"_ on the elements.**
|
|
30
30
|
*/
|
|
31
|
-
children: ReactElement<SidebarItemProps
|
|
31
|
+
children: Array<ReactElement<SidebarItemProps>> | ReactElement<SidebarItemProps>;
|
|
32
32
|
/**
|
|
33
33
|
* The childContainerClassName is applied to the element that contains the children.
|
|
34
34
|
* This can be used to change gap or similar styling.
|
|
@@ -5,14 +5,14 @@ export interface OverflowItemsOptions {
|
|
|
5
5
|
* If the child elements of the container are not available at the time of the hook initialization,
|
|
6
6
|
* you can pass the children as a prop, and the hook will initialize the observer when the children are available.
|
|
7
7
|
*/
|
|
8
|
-
children?: React.ReactElement<SidebarItemProps
|
|
8
|
+
children?: Array<React.ReactElement<SidebarItemProps>> | React.ReactElement<SidebarItemProps>;
|
|
9
9
|
/**
|
|
10
10
|
* The threshold for the intersection observer.
|
|
11
11
|
* Learn more: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#creating_an_intersection_observer
|
|
12
12
|
*
|
|
13
13
|
* @default 1
|
|
14
14
|
*/
|
|
15
|
-
threshold?: number | number
|
|
15
|
+
threshold?: number | Array<number>;
|
|
16
16
|
/**
|
|
17
17
|
* The unique identifier attribute for the child elements.
|
|
18
18
|
* The identifier is the value that will be returned in the visibleItemsIds array.
|
|
@@ -7,11 +7,11 @@ export interface SkeletonLinesProps extends CommonProps {
|
|
|
7
7
|
/**
|
|
8
8
|
* The height of lines. Can be a number or an array of numbers or string.
|
|
9
9
|
*/
|
|
10
|
-
height?: number | number
|
|
10
|
+
height?: number | Array<number> | string;
|
|
11
11
|
/**
|
|
12
12
|
* The width of each line. Can be a number or an array of numbers or string.
|
|
13
13
|
*/
|
|
14
|
-
width?: number | number
|
|
14
|
+
width?: number | Array<number> | string;
|
|
15
15
|
/**
|
|
16
16
|
* Margin of lines.
|
|
17
17
|
*/
|
|
@@ -5,7 +5,7 @@ export interface TabListProps extends TabsListProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* The child elements to be displayed within the Tabs component.
|
|
7
7
|
*/
|
|
8
|
-
children: ReactElement<TabContentProps
|
|
8
|
+
children: Array<ReactElement<TabContentProps>>;
|
|
9
9
|
/**
|
|
10
10
|
* A custom class name to be attached to root element
|
|
11
11
|
*/
|
|
@@ -38,7 +38,7 @@ export interface BasicToggleGroupListProps<TSelectedId extends string = string>
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
export type ToggleGroupProps<TSelectedId extends string = string> = CommonProps & Omit<VariantProps<typeof cvaToggleGroup>, "className"> & {
|
|
41
|
-
list:
|
|
41
|
+
list: ReadonlyArray<BasicToggleGroupListProps<TSelectedId>>;
|
|
42
42
|
/**
|
|
43
43
|
* Instead of onClick, we now use onChange to return the selected value
|
|
44
44
|
*/
|
|
@@ -7,7 +7,7 @@ import { RefObject } from "react";
|
|
|
7
7
|
* @param {Function} [options.onClick] - The event handler for the click outside event.
|
|
8
8
|
* @param {boolean} [options.active=true] - Whether the click outside event listener should be active.
|
|
9
9
|
*/
|
|
10
|
-
export declare const useClickOutside: (el: RefObject<HTMLElement | null> | RefObject<HTMLElement | null
|
|
10
|
+
export declare const useClickOutside: (el: RefObject<HTMLElement | null> | Array<RefObject<HTMLElement | null>>, options: {
|
|
11
11
|
onClick: (ev: MouseEvent) => void;
|
|
12
12
|
active?: boolean;
|
|
13
13
|
}) => void;
|