@trackunit/react-components 0.1.117 → 0.1.124
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 +39061 -2457
- package/index.js +39057 -2457
- package/package.json +9 -8
- package/src/common/CommonProps.d.ts +12 -12
- package/src/common/StorybookProps.d.ts +6 -6
- package/src/common/index.d.ts +3 -3
- package/src/common/useContainerProps.d.ts +16 -16
- package/src/components/Alert/Alert.d.ts +53 -53
- package/src/components/Alert/Alert.variants.d.ts +18 -18
- package/src/components/Alert/index.d.ts +1 -1
- package/src/components/Badge/Badge.d.ts +38 -38
- package/src/components/Badge/Badge.variants.d.ts +3 -3
- package/src/components/Badge/index.d.ts +1 -1
- package/src/components/Card/Card.d.ts +39 -39
- package/src/components/Card/Card.variants.d.ts +13 -13
- package/src/components/Card/CardBody.d.ts +25 -25
- package/src/components/Card/CardFooter.d.ts +25 -25
- package/src/components/Card/CardHeader.d.ts +47 -47
- package/src/components/Card/DensityContainer.d.ts +30 -30
- package/src/components/Card/index.d.ts +5 -5
- package/src/components/Clickable/Clickable.variants.d.ts +3 -3
- package/src/components/Collapse/Collapse.d.ts +28 -28
- package/src/components/Collapse/Collapse.variants.d.ts +8 -8
- package/src/components/Collapse/index.d.ts +1 -1
- package/src/components/CopyableText/CopyableText.d.ts +21 -21
- package/src/components/CopyableText/CopyableText.variants.d.ts +3 -3
- package/src/components/CopyableText/index.d.ts +1 -1
- package/src/components/DayPicker/DayPicker.d.ts +32 -32
- package/src/components/DayPicker/DayPickerPopover.d.ts +22 -22
- package/src/components/DayPicker/DayRangePicker.d.ts +33 -33
- package/src/components/DayPicker/index.d.ts +21 -21
- package/src/components/DayPicker/useLocale.d.ts +8 -8
- package/src/components/Drawer/Drawer.d.ts +32 -32
- package/src/components/Drawer/Drawer.variants.d.ts +4 -4
- package/src/components/ExternalLink/ExternalLink.d.ts +31 -31
- package/src/components/Heading/Heading.d.ts +28 -28
- package/src/components/Heading/Heading.variants.d.ts +5 -5
- package/src/components/Heading/index.d.ts +1 -1
- package/src/components/Icon/Icon.d.ts +52 -52
- package/src/components/Icon/Icon.variants.d.ts +8 -8
- package/src/components/Indicator/Indicator.d.ts +42 -42
- package/src/components/Indicator/Indicator.variants.d.ts +10 -10
- package/src/components/Indicator/index.d.ts +1 -1
- package/src/components/Menu/MenuItem/MenuItem.d.ts +57 -65
- package/src/components/Menu/MenuItem/MenuItem.variants.d.ts +12 -0
- package/src/components/Menu/MenuList/MenuList.d.ts +29 -36
- package/src/components/Menu/MenuList/MenuList.variants.d.ts +4 -0
- package/src/components/Menu/MoreMenu/MoreMenu.d.ts +24 -24
- package/src/components/Menu/MoreMenu/MoreMenu.variants.d.ts +1 -0
- package/src/components/Menu/index.d.ts +3 -3
- package/src/components/Modal/Modal.d.ts +30 -30
- package/src/components/Modal/Modal.variants.d.ts +5 -0
- package/src/components/Modal/ModalBackdrop.d.ts +13 -13
- package/src/components/Modal/index.d.ts +3 -3
- package/src/components/Modal/useModal.d.ts +21 -21
- package/src/components/PageHeader/PageHeader.d.ts +47 -47
- package/src/components/PageHeader/PageHeader.variants.d.ts +5 -5
- package/src/components/PageHeader/index.d.ts +1 -1
- package/src/components/Pagination/Pagination.d.ts +62 -62
- package/src/components/Pagination/Pagination.variants.d.ts +2 -2
- package/src/components/Popover/Popover.d.ts +72 -72
- package/src/components/Popover/Popover.variants.d.ts +5 -5
- package/src/components/Popover/PopoverContent.d.ts +7 -7
- package/src/components/Popover/PopoverTitle.d.ts +20 -20
- package/src/components/Popover/PopoverTrigger.d.ts +12 -12
- package/src/components/Popover/PopoverTypes.d.ts +33 -33
- package/src/components/Popover/index.d.ts +5 -5
- package/src/components/Popover/usePopover.d.ts +56 -56
- package/src/components/Prompt/Prompt.d.ts +20 -20
- package/src/components/Prompt/index.d.ts +1 -1
- package/src/components/SectionHeader/SectionHeader.d.ts +23 -23
- package/src/components/SectionHeader/index.d.ts +1 -1
- package/src/components/Sidebar/Sidebar.d.ts +57 -57
- package/src/components/Sidebar/Sidebar.variants.d.ts +4 -4
- package/src/components/Sidebar/useOverflowItems.d.ts +39 -39
- package/src/components/SkeletonLines/SkeletonLines.d.ts +25 -25
- package/src/components/SkeletonLines/SkeletonLines.variants.d.ts +1 -1
- package/src/components/SkeletonLines/index.d.ts +1 -1
- package/src/components/Spacer/Spacer.d.ts +20 -20
- package/src/components/Spacer/Spacer.variants.d.ts +4 -4
- package/src/components/Spacer/index.d.ts +1 -1
- package/src/components/Spinner/Spinner.d.ts +39 -39
- package/src/components/Spinner/Spinner.variants.d.ts +7 -7
- package/src/components/Spinner/index.d.ts +1 -1
- package/src/components/Tag/Tag.d.ts +40 -40
- package/src/components/Tag/Tag.variants.d.ts +7 -7
- package/src/components/Tag/index.d.ts +1 -1
- package/src/components/Text/Text.d.ts +58 -58
- package/src/components/Text/Text.variants.d.ts +9 -0
- package/src/components/Text/index.d.ts +1 -1
- package/src/components/Timeline/Timeline.d.ts +33 -33
- package/src/components/Timeline/Timeline.variants.d.ts +3 -3
- package/src/components/Tip/Tip.d.ts +26 -26
- package/src/components/Tip/Tip.variants.d.ts +4 -4
- package/src/components/Tip/index.d.ts +1 -1
- package/src/components/Tooltip/Tooltip.d.ts +37 -37
- package/src/components/Tooltip/Tooltip.variants.d.ts +6 -6
- package/src/components/Tooltip/index.d.ts +1 -1
- package/src/components/ValueBar/ValueBar.d.ts +44 -44
- package/src/components/ValueBar/ValueBar.variants.d.ts +9 -9
- package/src/components/ValueBar/ValueBarHelper.d.ts +35 -35
- package/src/components/ValueBar/ValueBarTypes.d.ts +9 -9
- package/src/components/ValueBar/index.d.ts +3 -3
- package/src/components/buttons/BackToTopButton/BackToTopButton.d.ts +14 -14
- package/src/components/buttons/BackToTopButton/BackToTopButton.variants.d.ts +3 -3
- package/src/components/buttons/Button/Button.d.ts +44 -44
- package/src/components/buttons/IconButton/IconButton.d.ts +20 -20
- package/src/components/buttons/StarButton/StarButton.d.ts +13 -13
- package/src/components/buttons/index.d.ts +4 -4
- package/src/components/buttons/shared/Button.variants.d.ts +13 -13
- package/src/components/buttons/shared/ButtonProps.d.ts +48 -48
- package/src/components/index.d.ts +30 -30
- package/src/hooks/index.d.ts +9 -9
- package/src/hooks/localStorage/initLocalStorageState.d.ts +9 -0
- package/src/hooks/localStorage/types.d.ts +27 -0
- package/src/hooks/localStorage/useLocalStorage.d.ts +10 -0
- package/src/hooks/localStorage/useLocalStorageEffect.d.ts +11 -0
- package/src/hooks/localStorage/useLocalStorageReducer.d.ts +13 -0
- package/src/hooks/localStorage/validateState.d.ts +13 -0
- package/src/hooks/useClickOutside.d.ts +12 -12
- package/src/hooks/useDebounce.d.ts +13 -13
- package/src/hooks/useDevicePixelRatio.d.ts +37 -37
- package/src/hooks/useHover.d.ts +24 -24
- package/src/hooks/useIsFirstRender.d.ts +6 -6
- package/src/hooks/useResize.d.ts +10 -10
- package/src/hooks/useTimeout.d.ts +11 -11
- package/src/index.d.ts +8 -7
- package/src/layout/helper/MinTopFullContentLayout.d.ts +18 -18
- package/src/layout/index.d.ts +6 -6
- package/src/layout/responsive/FilterListMapLayout.d.ts +15 -22
- package/src/layout/responsive/FullWidthRepeatingLayout.d.ts +19 -19
- package/src/layout/responsive/GridArea.d.ts +13 -13
- package/src/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +32 -32
- package/src/layout/responsive/TitleNavContentLayout.d.ts +28 -28
- package/src/test-utils/hooks.d.ts +4 -4
- package/src/test-utils/test-utils.d.ts +5 -5
- package/src/hooks/useLocalStorage.d.ts +0 -9
- package/src/hooks/useLocalStorageReducer.d.ts +0 -7
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CommonProps } from "../../common";
|
|
3
|
-
export interface ExternalLinkProps extends CommonProps {
|
|
4
|
-
/**
|
|
5
|
-
* The URL to which users are redirected
|
|
6
|
-
*/
|
|
7
|
-
href: string;
|
|
8
|
-
/**
|
|
9
|
-
* Child elements.
|
|
10
|
-
*/
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* The text to display on the URL. Defaults to the url itself.
|
|
14
|
-
*/
|
|
15
|
-
title?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Where to display the linked URL. Defaults to "_blank".
|
|
18
|
-
*/
|
|
19
|
-
target?: "_blank" | "_self" | "_parent" | "top";
|
|
20
|
-
/**
|
|
21
|
-
* Used to specify the relationship between the link and the current document. Defaults to "noreferrer".
|
|
22
|
-
*/
|
|
23
|
-
rel?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* The external link component is used to link to an external page outside the Trackunit Manager.
|
|
27
|
-
*
|
|
28
|
-
* @param {ExternalLinkProps} props - The props for the external link component
|
|
29
|
-
* @returns {JSX.Element} External Link component
|
|
30
|
-
*/
|
|
31
|
-
export declare const ExternalLink: ({ rel, target, href, className, children, title, dataTestId, }: ExternalLinkProps) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from "../../common";
|
|
3
|
+
export interface ExternalLinkProps extends CommonProps {
|
|
4
|
+
/**
|
|
5
|
+
* The URL to which users are redirected
|
|
6
|
+
*/
|
|
7
|
+
href: string;
|
|
8
|
+
/**
|
|
9
|
+
* Child elements.
|
|
10
|
+
*/
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* The text to display on the URL. Defaults to the url itself.
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Where to display the linked URL. Defaults to "_blank".
|
|
18
|
+
*/
|
|
19
|
+
target?: "_blank" | "_self" | "_parent" | "top";
|
|
20
|
+
/**
|
|
21
|
+
* Used to specify the relationship between the link and the current document. Defaults to "noreferrer".
|
|
22
|
+
*/
|
|
23
|
+
rel?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The external link component is used to link to an external page outside the Trackunit Manager.
|
|
27
|
+
*
|
|
28
|
+
* @param {ExternalLinkProps} props - The props for the external link component
|
|
29
|
+
* @returns {JSX.Element} External Link component
|
|
30
|
+
*/
|
|
31
|
+
export declare const ExternalLink: ({ rel, target, href, className, children, title, dataTestId, }: ExternalLinkProps) => JSX.Element;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
-
export type HeadingVariant = "primary" | "secondary" | "tertiary" | "subtitle";
|
|
4
|
-
export interface HeadingProps extends CommonProps {
|
|
5
|
-
/**
|
|
6
|
-
* Child Nodes.
|
|
7
|
-
*/
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* Size of heading.
|
|
11
|
-
*/
|
|
12
|
-
variant: HeadingVariant;
|
|
13
|
-
/**
|
|
14
|
-
* Whether the heading uses inverted styles or not.
|
|
15
|
-
*/
|
|
16
|
-
inverted?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Whether the heading is a subtitle or not.
|
|
19
|
-
*/
|
|
20
|
-
subtle?: boolean;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The Heading is used for a heading of a section (h1,h2,h3,h4).
|
|
24
|
-
*
|
|
25
|
-
* @param {HeadingProps} props - The props for the Heading component
|
|
26
|
-
* @returns {JSX.Element} Heading component
|
|
27
|
-
*/
|
|
28
|
-
export declare const Heading: ({ children, variant, inverted, subtle, className, dataTestId, }: HeadingProps) => JSX.Element;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
+
export type HeadingVariant = "primary" | "secondary" | "tertiary" | "subtitle";
|
|
4
|
+
export interface HeadingProps extends CommonProps {
|
|
5
|
+
/**
|
|
6
|
+
* Child Nodes.
|
|
7
|
+
*/
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Size of heading.
|
|
11
|
+
*/
|
|
12
|
+
variant: HeadingVariant;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the heading uses inverted styles or not.
|
|
15
|
+
*/
|
|
16
|
+
inverted?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the heading is a subtitle or not.
|
|
19
|
+
*/
|
|
20
|
+
subtle?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The Heading is used for a heading of a section (h1,h2,h3,h4).
|
|
24
|
+
*
|
|
25
|
+
* @param {HeadingProps} props - The props for the Heading component
|
|
26
|
+
* @returns {JSX.Element} Heading component
|
|
27
|
+
*/
|
|
28
|
+
export declare const Heading: ({ children, variant, inverted, subtle, className, dataTestId, }: HeadingProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const cvaHeading: (props?: ({
|
|
2
|
-
subtle?: boolean | null | undefined;
|
|
3
|
-
inverted?: boolean | null | undefined;
|
|
4
|
-
size?: "primary" | "secondary" | "tertiary" | "subtitle" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
1
|
+
export declare const cvaHeading: (props?: ({
|
|
2
|
+
subtle?: boolean | null | undefined;
|
|
3
|
+
inverted?: boolean | null | undefined;
|
|
4
|
+
size?: "primary" | "secondary" | "tertiary" | "subtitle" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./Heading";
|
|
1
|
+
export * from "./Heading";
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { ActivityColors, CriticalityColors, GeneralColors, IntentColors } from "@trackunit/ui-design-tokens";
|
|
2
|
-
import { HeroIconName, TrackunitIconName } from "@trackunit/ui-icons";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { CommonProps, Size } from "../../common/CommonProps";
|
|
5
|
-
export type IconColors = IntentColors | GeneralColors | CriticalityColors | ActivityColors;
|
|
6
|
-
export interface IconProps extends CommonProps {
|
|
7
|
-
/**
|
|
8
|
-
* The name of the icon to be rendered.
|
|
9
|
-
* HeroIconName and TrackunitIconName are supported.
|
|
10
|
-
*/
|
|
11
|
-
name: TrackunitIconName | HeroIconName;
|
|
12
|
-
/**
|
|
13
|
-
* The color of the icon.
|
|
14
|
-
* Supports any colors from the theme.
|
|
15
|
-
* Custom colors can be used by setting a text color in the className.
|
|
16
|
-
*/
|
|
17
|
-
color?: IconColors;
|
|
18
|
-
/**
|
|
19
|
-
* The size of the icon.
|
|
20
|
-
* Small = 16x16px, medium = 20x20px, Large = 24x24px.
|
|
21
|
-
* Default value is Large.
|
|
22
|
-
* If a custom size is needed, set it in the className.
|
|
23
|
-
*/
|
|
24
|
-
size?: Size | "font";
|
|
25
|
-
/**
|
|
26
|
-
* Select if the icon should be rendered as solid or outline.
|
|
27
|
-
* Default value depends on the Size prop, small == solid, medium == solid, large == outline.
|
|
28
|
-
* Trackunit icons might not support both outline and Solid.
|
|
29
|
-
*/
|
|
30
|
-
type?: "solid" | "outline";
|
|
31
|
-
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
32
|
-
/**
|
|
33
|
-
* @deprecated
|
|
34
|
-
*/
|
|
35
|
-
fillColor?: string;
|
|
36
|
-
forwardedRef?: React.RefObject<HTMLSpanElement>;
|
|
37
|
-
/**
|
|
38
|
-
* Custom styles object used to override existing styles or add some extra styling
|
|
39
|
-
*
|
|
40
|
-
* @memberof IconProps
|
|
41
|
-
*/
|
|
42
|
-
style?: Record<string, string>;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* - The Icon component is used to display an Icon.
|
|
46
|
-
* - Icons are semantic vector graphics that adds character and improves the visual appeal of elements when combined with.
|
|
47
|
-
* - All the [HeroIcons](https://heroicons.dev/) as well as custom TrackUnit icons are available.
|
|
48
|
-
*
|
|
49
|
-
* @param {IconProps} props - The props for the Icon component
|
|
50
|
-
* @returns {JSX.Element} Icon component
|
|
51
|
-
*/
|
|
52
|
-
export declare const Icon: ({ name, size, className, dataTestId, color, onClick, fillColor, type, style, forwardedRef, }: IconProps) => JSX.Element | null;
|
|
1
|
+
import { ActivityColors, CriticalityColors, GeneralColors, IntentColors } from "@trackunit/ui-design-tokens";
|
|
2
|
+
import { HeroIconName, TrackunitIconName } from "@trackunit/ui-icons";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { CommonProps, Size } from "../../common/CommonProps";
|
|
5
|
+
export type IconColors = IntentColors | GeneralColors | CriticalityColors | ActivityColors;
|
|
6
|
+
export interface IconProps extends CommonProps {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the icon to be rendered.
|
|
9
|
+
* HeroIconName and TrackunitIconName are supported.
|
|
10
|
+
*/
|
|
11
|
+
name: TrackunitIconName | HeroIconName;
|
|
12
|
+
/**
|
|
13
|
+
* The color of the icon.
|
|
14
|
+
* Supports any colors from the theme.
|
|
15
|
+
* Custom colors can be used by setting a text color in the className.
|
|
16
|
+
*/
|
|
17
|
+
color?: IconColors;
|
|
18
|
+
/**
|
|
19
|
+
* The size of the icon.
|
|
20
|
+
* Small = 16x16px, medium = 20x20px, Large = 24x24px.
|
|
21
|
+
* Default value is Large.
|
|
22
|
+
* If a custom size is needed, set it in the className.
|
|
23
|
+
*/
|
|
24
|
+
size?: Size | "font";
|
|
25
|
+
/**
|
|
26
|
+
* Select if the icon should be rendered as solid or outline.
|
|
27
|
+
* Default value depends on the Size prop, small == solid, medium == solid, large == outline.
|
|
28
|
+
* Trackunit icons might not support both outline and Solid.
|
|
29
|
+
*/
|
|
30
|
+
type?: "solid" | "outline";
|
|
31
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated
|
|
34
|
+
*/
|
|
35
|
+
fillColor?: string;
|
|
36
|
+
forwardedRef?: React.RefObject<HTMLSpanElement>;
|
|
37
|
+
/**
|
|
38
|
+
* Custom styles object used to override existing styles or add some extra styling
|
|
39
|
+
*
|
|
40
|
+
* @memberof IconProps
|
|
41
|
+
*/
|
|
42
|
+
style?: Record<string, string>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* - The Icon component is used to display an Icon.
|
|
46
|
+
* - Icons are semantic vector graphics that adds character and improves the visual appeal of elements when combined with.
|
|
47
|
+
* - All the [HeroIcons](https://heroicons.dev/) as well as custom TrackUnit icons are available.
|
|
48
|
+
*
|
|
49
|
+
* @param {IconProps} props - The props for the Icon component
|
|
50
|
+
* @returns {JSX.Element} Icon component
|
|
51
|
+
*/
|
|
52
|
+
export declare const Icon: ({ name, size, className, dataTestId, color, onClick, fillColor, type, style, forwardedRef, }: IconProps) => JSX.Element | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const cvaIcon: (props?: ({
|
|
2
|
-
color?: "primary" | "secondary" | "accent" | "neutral" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "idle" | "moving" | "active" | "stopped" | "unknown" | "default" | "black" | "white" | null | undefined;
|
|
3
|
-
size?: "small" | "medium" | "large" | "font" | null | undefined;
|
|
4
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
5
|
-
export declare const cvaIconComponent: (props?: ({
|
|
6
|
-
iconType?: "solid" | "outline" | null | undefined;
|
|
7
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
-
export declare const cvaLoadingDot: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
1
|
+
export declare const cvaIcon: (props?: ({
|
|
2
|
+
color?: "primary" | "secondary" | "accent" | "neutral" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "idle" | "moving" | "active" | "stopped" | "unknown" | "default" | "black" | "white" | null | undefined;
|
|
3
|
+
size?: "small" | "medium" | "large" | "font" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const cvaIconComponent: (props?: ({
|
|
6
|
+
iconType?: "solid" | "outline" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const cvaLoadingDot: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ThemeColors } from "@trackunit/ui-design-tokens";
|
|
3
|
-
import { CommonProps } from "../../common/CommonProps";
|
|
4
|
-
export interface IndicatorProps extends CommonProps {
|
|
5
|
-
/**
|
|
6
|
-
* The icon to be rendered inside the indicator component
|
|
7
|
-
*/
|
|
8
|
-
icon: JSX.Element;
|
|
9
|
-
/**
|
|
10
|
-
* A color token used to style the icon and the icon background
|
|
11
|
-
*/
|
|
12
|
-
color?: ThemeColors;
|
|
13
|
-
/**
|
|
14
|
-
* A text label to be displayed next to the indicator
|
|
15
|
-
*/
|
|
16
|
-
label?: string;
|
|
17
|
-
/**
|
|
18
|
-
* A boolean parameter to display or hide icon background, default value is true
|
|
19
|
-
*/
|
|
20
|
-
withBackground?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* A boolean parameter to display or hide label and instead show as html title on hover, default value is true
|
|
23
|
-
*/
|
|
24
|
-
withLabel?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* A boolean parameter to make the indicator ping thus drawing more attention, default value is false
|
|
27
|
-
*/
|
|
28
|
-
ping?: boolean;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Indicators are non-interactive elements that communicate essential aspects of the state of an asset.
|
|
32
|
-
*
|
|
33
|
-
* Whenever an asset is presented, indicators provide the necessary information for a user to comprehend the state of the asset.
|
|
34
|
-
*
|
|
35
|
-
* _**Do use** indicators to communicate essential aspects of the state of an asset._
|
|
36
|
-
*
|
|
37
|
-
* _**Do not use** indicators for non-essential information, or to communicate information unrelated to the state of an asset._
|
|
38
|
-
*
|
|
39
|
-
* @param {IndicatorProps} props - The props for the Indicator component
|
|
40
|
-
* @returns {JSX.Element} Indicator component
|
|
41
|
-
*/
|
|
42
|
-
export declare const Indicator: ({ dataTestId, icon, label, color, withBackground, withLabel, ping, className, ...rest }: IndicatorProps) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeColors } from "@trackunit/ui-design-tokens";
|
|
3
|
+
import { CommonProps } from "../../common/CommonProps";
|
|
4
|
+
export interface IndicatorProps extends CommonProps {
|
|
5
|
+
/**
|
|
6
|
+
* The icon to be rendered inside the indicator component
|
|
7
|
+
*/
|
|
8
|
+
icon: JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* A color token used to style the icon and the icon background
|
|
11
|
+
*/
|
|
12
|
+
color?: ThemeColors;
|
|
13
|
+
/**
|
|
14
|
+
* A text label to be displayed next to the indicator
|
|
15
|
+
*/
|
|
16
|
+
label?: string;
|
|
17
|
+
/**
|
|
18
|
+
* A boolean parameter to display or hide icon background, default value is true
|
|
19
|
+
*/
|
|
20
|
+
withBackground?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* A boolean parameter to display or hide label and instead show as html title on hover, default value is true
|
|
23
|
+
*/
|
|
24
|
+
withLabel?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* A boolean parameter to make the indicator ping thus drawing more attention, default value is false
|
|
27
|
+
*/
|
|
28
|
+
ping?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Indicators are non-interactive elements that communicate essential aspects of the state of an asset.
|
|
32
|
+
*
|
|
33
|
+
* Whenever an asset is presented, indicators provide the necessary information for a user to comprehend the state of the asset.
|
|
34
|
+
*
|
|
35
|
+
* _**Do use** indicators to communicate essential aspects of the state of an asset._
|
|
36
|
+
*
|
|
37
|
+
* _**Do not use** indicators for non-essential information, or to communicate information unrelated to the state of an asset._
|
|
38
|
+
*
|
|
39
|
+
* @param {IndicatorProps} props - The props for the Indicator component
|
|
40
|
+
* @returns {JSX.Element} Indicator component
|
|
41
|
+
*/
|
|
42
|
+
export declare const Indicator: ({ dataTestId, icon, label, color, withBackground, withLabel, ping, className, ...rest }: IndicatorProps) => JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare const cvaIndicator: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
2
|
-
export declare const cvaIndicatorIcon: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
3
|
-
export declare const cvaIndicatorLabel: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
4
|
-
export declare const cvaIndicatorPing: (props?: ({
|
|
5
|
-
color?: "primary" | "secondary" | "accent" | "neutral" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "idle" | "stopped" | "moving" | "active" | "unknown" | "unused" | "utilized" | "heavily_utilized" | "available" | "on_rent" | "pickup_ready" | "transfer" | "in_repair" | "returned" | "other_rental_status" | "site" | "white" | "black" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
export declare const cvaIndicatorIconBackground: (props?: ({
|
|
8
|
-
color?: "primary" | "secondary" | "accent" | "neutral" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "idle" | "stopped" | "moving" | "active" | "unknown" | "unused" | "utilized" | "heavily_utilized" | "available" | "on_rent" | "pickup_ready" | "transfer" | "in_repair" | "returned" | "other_rental_status" | "site" | "white" | "black" | null | undefined;
|
|
9
|
-
background?: "visible" | "hidden" | null | undefined;
|
|
10
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
1
|
+
export declare const cvaIndicator: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
2
|
+
export declare const cvaIndicatorIcon: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
3
|
+
export declare const cvaIndicatorLabel: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
4
|
+
export declare const cvaIndicatorPing: (props?: ({
|
|
5
|
+
color?: "primary" | "secondary" | "accent" | "neutral" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "idle" | "stopped" | "moving" | "active" | "unknown" | "unused" | "utilized" | "heavily_utilized" | "available" | "on_rent" | "pickup_ready" | "transfer" | "in_repair" | "returned" | "other_rental_status" | "site" | "white" | "black" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export declare const cvaIndicatorIconBackground: (props?: ({
|
|
8
|
+
color?: "primary" | "secondary" | "accent" | "neutral" | "info" | "success" | "warning" | "danger" | "good" | "low" | "critical" | "working" | "idle" | "stopped" | "moving" | "active" | "unknown" | "unused" | "utilized" | "heavily_utilized" | "available" | "on_rent" | "pickup_ready" | "transfer" | "in_repair" | "returned" | "other_rental_status" | "site" | "white" | "black" | null | undefined;
|
|
9
|
+
background?: "visible" | "hidden" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./Indicator";
|
|
1
|
+
export * from "./Indicator";
|
|
@@ -1,65 +1,57 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { CommonProps } from "../../../common";
|
|
3
|
-
export interface MenuItemProps extends CommonProps {
|
|
4
|
-
/**
|
|
5
|
-
* Label of the menu item
|
|
6
|
-
*/
|
|
7
|
-
label?: string;
|
|
8
|
-
/**
|
|
9
|
-
* The children element is a custom element that can be used to override the label.
|
|
10
|
-
* If you use this prop, the label prop will be ignored.
|
|
11
|
-
*/
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* The MenuItem component is used to display a menu, primarily meant to be used in a list form.
|
|
61
|
-
*
|
|
62
|
-
* @param {MenuItemProps} props - The props for the MenuItem component
|
|
63
|
-
* @returns {JSX.Element} MenuItem component
|
|
64
|
-
*/
|
|
65
|
-
export declare const MenuItem: ({ className, dataTestId, label, children, selected, focused, prefix, suffix, disabled, onClick, }: MenuItemProps) => JSX.Element;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CommonProps } from "../../../common";
|
|
3
|
+
export interface MenuItemProps extends CommonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Label of the menu item
|
|
6
|
+
*/
|
|
7
|
+
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The children element is a custom element that can be used to override the label.
|
|
10
|
+
* If you use this prop, the label prop will be ignored.
|
|
11
|
+
*/
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* An React element to render before the label.
|
|
15
|
+
* This is typically used to render an icon.
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
prefix?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* An React element to render after the label.
|
|
21
|
+
* This is typically used to render an icon.
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
suffix?: JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* An boolean flag to turn on/off selected state
|
|
27
|
+
* This is typically used highlight that item is selected
|
|
28
|
+
*
|
|
29
|
+
* @memberof IMenuItemProps
|
|
30
|
+
*/
|
|
31
|
+
selected?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* OnClick event handler it is thrown on root element of the component tree
|
|
34
|
+
*
|
|
35
|
+
* @memberof IMenuItemProps
|
|
36
|
+
*/
|
|
37
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
38
|
+
/**
|
|
39
|
+
* An boolean flag to turn on/off focused state
|
|
40
|
+
* This is typically used for keyboard navigation
|
|
41
|
+
*
|
|
42
|
+
* @memberof IMenuItemProps
|
|
43
|
+
*/
|
|
44
|
+
focused?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* A boolean prop to set menu item to disabled state
|
|
47
|
+
* used in disabled select options
|
|
48
|
+
*/
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The MenuItem component is used to display a menu, primarily meant to be used in a list form.
|
|
53
|
+
*
|
|
54
|
+
* @param {MenuItemProps} props - The props for the MenuItem component
|
|
55
|
+
* @returns {JSX.Element} MenuItem component
|
|
56
|
+
*/
|
|
57
|
+
export declare const MenuItem: ({ className, dataTestId, label, children, selected, focused, prefix, suffix, disabled, onClick, }: MenuItemProps) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const cvaMenuItem: (props?: ({
|
|
2
|
+
selected?: boolean | null | undefined;
|
|
3
|
+
disabled?: boolean | null | undefined;
|
|
4
|
+
focused?: boolean | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
export declare const cvaMenuItemLabel: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
7
|
+
export declare const cvaMenuItemSuffix: (props?: ({
|
|
8
|
+
selected?: boolean | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
10
|
+
export declare const cvaMenuItemPrefix: (props?: ({
|
|
11
|
+
selected?: boolean | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -1,36 +1,29 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MenuItemProps } from "../MenuItem/MenuItem";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* The MenuList component is used for menus and selects.
|
|
32
|
-
*
|
|
33
|
-
* @param {MenuListProps} props - The props for the MenuList component
|
|
34
|
-
* @returns {JSX.Element} MenuList component
|
|
35
|
-
*/
|
|
36
|
-
export declare const MenuList: ({ dataTestId, className, children, withStickyHeader, showDivider, ...args }: MenuListProps) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuItemProps } from "../MenuItem/MenuItem";
|
|
3
|
+
import { CommonProps } from "../../../common";
|
|
4
|
+
export interface MenuListItemProps extends MenuItemProps {
|
|
5
|
+
showDivider?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface MenuListProps extends CommonProps {
|
|
8
|
+
/**
|
|
9
|
+
* List of menu items to be rendered.
|
|
10
|
+
*/
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* List of menu items to be rendered.
|
|
14
|
+
*/
|
|
15
|
+
showDivider?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* When enabled the menu list padding will be removed, and a grid will be applied to keep the first column "sticky".
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
withStickyHeader?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The MenuList component is used for menus and selects.
|
|
25
|
+
*
|
|
26
|
+
* @param {MenuListProps} props - The props for the MenuList component
|
|
27
|
+
* @returns {JSX.Element} MenuList component
|
|
28
|
+
*/
|
|
29
|
+
export declare const MenuList: ({ dataTestId, className, children, withStickyHeader, showDivider, ...args }: MenuListProps) => JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const cvaMenuList: (props?: ({
|
|
2
|
+
stickyHeader?: boolean | null | undefined;
|
|
3
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
4
|
+
export declare const cvaMenuListDivider: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { CommonProps } from "../../../common/CommonProps";
|
|
3
|
-
import { IconButtonProps } from "../../buttons";
|
|
4
|
-
import { IconProps } from "../../Icon/Icon";
|
|
5
|
-
import { PopoverContentChildren, PopoverPlacement } from "../../Popover";
|
|
6
|
-
export type MenuPlacement = "above" | "below";
|
|
7
|
-
type FilteredIconProps = Omit<IconProps, "onClick" | "name"> & Pick<Partial<IconProps>, "name">;
|
|
8
|
-
type FilteredIconButtonProps = Omit<IconButtonProps, "icon" | "onClick">;
|
|
9
|
-
export interface MoreMenuProps extends CommonProps {
|
|
10
|
-
children: PopoverContentChildren;
|
|
11
|
-
menuPlacement?: PopoverPlacement;
|
|
12
|
-
iconProps?: FilteredIconProps;
|
|
13
|
-
iconButtonProps?: FilteredIconButtonProps;
|
|
14
|
-
customButton?: ReactNode;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* A kebab menu component.
|
|
18
|
-
* Advice: fill it with MenuList
|
|
19
|
-
*
|
|
20
|
-
* @param {MoreMenuProps} props - The props for the MoreMenu component
|
|
21
|
-
* @returns {JSX.Element} MoreMenu component
|
|
22
|
-
*/
|
|
23
|
-
export declare const MoreMenu: ({ className, dataTestId, menuPlacement, iconProps, iconButtonProps, customButton, children, }: MoreMenuProps) => JSX.Element;
|
|
24
|
-
export {};
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { CommonProps } from "../../../common/CommonProps";
|
|
3
|
+
import { IconButtonProps } from "../../buttons";
|
|
4
|
+
import { IconProps } from "../../Icon/Icon";
|
|
5
|
+
import { PopoverContentChildren, PopoverPlacement } from "../../Popover";
|
|
6
|
+
export type MenuPlacement = "above" | "below";
|
|
7
|
+
type FilteredIconProps = Omit<IconProps, "onClick" | "name"> & Pick<Partial<IconProps>, "name">;
|
|
8
|
+
type FilteredIconButtonProps = Omit<IconButtonProps, "icon" | "onClick">;
|
|
9
|
+
export interface MoreMenuProps extends CommonProps {
|
|
10
|
+
children: PopoverContentChildren;
|
|
11
|
+
menuPlacement?: PopoverPlacement;
|
|
12
|
+
iconProps?: FilteredIconProps;
|
|
13
|
+
iconButtonProps?: FilteredIconButtonProps;
|
|
14
|
+
customButton?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A kebab menu component.
|
|
18
|
+
* Advice: fill it with MenuList
|
|
19
|
+
*
|
|
20
|
+
* @param {MoreMenuProps} props - The props for the MoreMenu component
|
|
21
|
+
* @returns {JSX.Element} MoreMenu component
|
|
22
|
+
*/
|
|
23
|
+
export declare const MoreMenu: ({ className, dataTestId, menuPlacement, iconProps, iconButtonProps, customButton, children, }: MoreMenuProps) => JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cvaMoreMenu: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|