@trackunit/react-components 0.1.117 → 0.1.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/index.cjs +38905 -2435
  2. package/index.js +38914 -2444
  3. package/package.json +7 -7
  4. package/src/common/CommonProps.d.ts +12 -12
  5. package/src/common/StorybookProps.d.ts +6 -6
  6. package/src/common/index.d.ts +3 -3
  7. package/src/common/useContainerProps.d.ts +16 -16
  8. package/src/components/Alert/Alert.d.ts +53 -53
  9. package/src/components/Alert/Alert.variants.d.ts +18 -18
  10. package/src/components/Alert/index.d.ts +1 -1
  11. package/src/components/Badge/Badge.d.ts +38 -38
  12. package/src/components/Badge/Badge.variants.d.ts +3 -3
  13. package/src/components/Badge/index.d.ts +1 -1
  14. package/src/components/Card/Card.d.ts +39 -39
  15. package/src/components/Card/Card.variants.d.ts +13 -13
  16. package/src/components/Card/CardBody.d.ts +25 -25
  17. package/src/components/Card/CardFooter.d.ts +25 -25
  18. package/src/components/Card/CardHeader.d.ts +47 -47
  19. package/src/components/Card/DensityContainer.d.ts +30 -30
  20. package/src/components/Card/index.d.ts +5 -5
  21. package/src/components/Clickable/Clickable.variants.d.ts +3 -3
  22. package/src/components/Collapse/Collapse.d.ts +28 -28
  23. package/src/components/Collapse/Collapse.variants.d.ts +8 -8
  24. package/src/components/Collapse/index.d.ts +1 -1
  25. package/src/components/CopyableText/CopyableText.d.ts +21 -21
  26. package/src/components/CopyableText/CopyableText.variants.d.ts +3 -3
  27. package/src/components/CopyableText/index.d.ts +1 -1
  28. package/src/components/DayPicker/DayPicker.d.ts +32 -32
  29. package/src/components/DayPicker/DayPickerPopover.d.ts +22 -22
  30. package/src/components/DayPicker/DayRangePicker.d.ts +33 -33
  31. package/src/components/DayPicker/index.d.ts +21 -21
  32. package/src/components/DayPicker/useLocale.d.ts +8 -8
  33. package/src/components/Drawer/Drawer.d.ts +32 -32
  34. package/src/components/Drawer/Drawer.variants.d.ts +4 -4
  35. package/src/components/ExternalLink/ExternalLink.d.ts +31 -31
  36. package/src/components/Heading/Heading.d.ts +28 -28
  37. package/src/components/Heading/Heading.variants.d.ts +5 -5
  38. package/src/components/Heading/index.d.ts +1 -1
  39. package/src/components/Icon/Icon.d.ts +52 -52
  40. package/src/components/Icon/Icon.variants.d.ts +8 -8
  41. package/src/components/Indicator/Indicator.d.ts +42 -42
  42. package/src/components/Indicator/Indicator.variants.d.ts +10 -10
  43. package/src/components/Indicator/index.d.ts +1 -1
  44. package/src/components/Menu/MenuItem/MenuItem.d.ts +65 -65
  45. package/src/components/Menu/MenuList/MenuList.d.ts +36 -36
  46. package/src/components/Menu/MoreMenu/MoreMenu.d.ts +24 -24
  47. package/src/components/Menu/index.d.ts +3 -3
  48. package/src/components/Modal/Modal.d.ts +30 -30
  49. package/src/components/Modal/ModalBackdrop.d.ts +13 -13
  50. package/src/components/Modal/index.d.ts +3 -3
  51. package/src/components/Modal/useModal.d.ts +21 -21
  52. package/src/components/PageHeader/PageHeader.d.ts +47 -47
  53. package/src/components/PageHeader/PageHeader.variants.d.ts +5 -5
  54. package/src/components/PageHeader/index.d.ts +1 -1
  55. package/src/components/Pagination/Pagination.d.ts +62 -62
  56. package/src/components/Pagination/Pagination.variants.d.ts +2 -2
  57. package/src/components/Popover/Popover.d.ts +72 -72
  58. package/src/components/Popover/Popover.variants.d.ts +5 -5
  59. package/src/components/Popover/PopoverContent.d.ts +7 -7
  60. package/src/components/Popover/PopoverTitle.d.ts +20 -20
  61. package/src/components/Popover/PopoverTrigger.d.ts +12 -12
  62. package/src/components/Popover/PopoverTypes.d.ts +33 -33
  63. package/src/components/Popover/index.d.ts +5 -5
  64. package/src/components/Popover/usePopover.d.ts +56 -56
  65. package/src/components/Prompt/Prompt.d.ts +20 -20
  66. package/src/components/Prompt/index.d.ts +1 -1
  67. package/src/components/SectionHeader/SectionHeader.d.ts +23 -23
  68. package/src/components/SectionHeader/index.d.ts +1 -1
  69. package/src/components/Sidebar/Sidebar.d.ts +57 -57
  70. package/src/components/Sidebar/Sidebar.variants.d.ts +4 -4
  71. package/src/components/Sidebar/useOverflowItems.d.ts +39 -39
  72. package/src/components/SkeletonLines/SkeletonLines.d.ts +25 -25
  73. package/src/components/SkeletonLines/SkeletonLines.variants.d.ts +1 -1
  74. package/src/components/SkeletonLines/index.d.ts +1 -1
  75. package/src/components/Spacer/Spacer.d.ts +20 -20
  76. package/src/components/Spacer/Spacer.variants.d.ts +4 -4
  77. package/src/components/Spacer/index.d.ts +1 -1
  78. package/src/components/Spinner/Spinner.d.ts +39 -39
  79. package/src/components/Spinner/Spinner.variants.d.ts +7 -7
  80. package/src/components/Spinner/index.d.ts +1 -1
  81. package/src/components/Tag/Tag.d.ts +40 -40
  82. package/src/components/Tag/Tag.variants.d.ts +7 -7
  83. package/src/components/Tag/index.d.ts +1 -1
  84. package/src/components/Text/Text.d.ts +58 -58
  85. package/src/components/Text/index.d.ts +1 -1
  86. package/src/components/Timeline/Timeline.d.ts +33 -33
  87. package/src/components/Timeline/Timeline.variants.d.ts +3 -3
  88. package/src/components/Tip/Tip.d.ts +26 -26
  89. package/src/components/Tip/Tip.variants.d.ts +4 -4
  90. package/src/components/Tip/index.d.ts +1 -1
  91. package/src/components/Tooltip/Tooltip.d.ts +37 -37
  92. package/src/components/Tooltip/Tooltip.variants.d.ts +6 -6
  93. package/src/components/Tooltip/index.d.ts +1 -1
  94. package/src/components/ValueBar/ValueBar.d.ts +44 -44
  95. package/src/components/ValueBar/ValueBar.variants.d.ts +9 -9
  96. package/src/components/ValueBar/ValueBarHelper.d.ts +35 -35
  97. package/src/components/ValueBar/ValueBarTypes.d.ts +9 -9
  98. package/src/components/ValueBar/index.d.ts +3 -3
  99. package/src/components/buttons/BackToTopButton/BackToTopButton.d.ts +14 -14
  100. package/src/components/buttons/BackToTopButton/BackToTopButton.variants.d.ts +3 -3
  101. package/src/components/buttons/Button/Button.d.ts +44 -44
  102. package/src/components/buttons/IconButton/IconButton.d.ts +20 -20
  103. package/src/components/buttons/StarButton/StarButton.d.ts +13 -13
  104. package/src/components/buttons/index.d.ts +4 -4
  105. package/src/components/buttons/shared/Button.variants.d.ts +13 -13
  106. package/src/components/buttons/shared/ButtonProps.d.ts +48 -48
  107. package/src/components/index.d.ts +30 -30
  108. package/src/hooks/index.d.ts +9 -9
  109. package/src/hooks/useClickOutside.d.ts +12 -12
  110. package/src/hooks/useDebounce.d.ts +13 -13
  111. package/src/hooks/useDevicePixelRatio.d.ts +37 -37
  112. package/src/hooks/useHover.d.ts +24 -24
  113. package/src/hooks/useIsFirstRender.d.ts +6 -6
  114. package/src/hooks/useLocalStorage.d.ts +9 -9
  115. package/src/hooks/useLocalStorageReducer.d.ts +7 -7
  116. package/src/hooks/useResize.d.ts +10 -10
  117. package/src/hooks/useTimeout.d.ts +11 -11
  118. package/src/index.d.ts +7 -7
  119. package/src/layout/helper/MinTopFullContentLayout.d.ts +18 -18
  120. package/src/layout/index.d.ts +6 -6
  121. package/src/layout/responsive/FilterListMapLayout.d.ts +15 -22
  122. package/src/layout/responsive/FullWidthRepeatingLayout.d.ts +19 -19
  123. package/src/layout/responsive/GridArea.d.ts +13 -13
  124. package/src/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +32 -32
  125. package/src/layout/responsive/TitleNavContentLayout.d.ts +28 -28
  126. package/src/test-utils/hooks.d.ts +4 -4
  127. package/src/test-utils/test-utils.d.ts +5 -5
@@ -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,65 @@
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
- * Additional tailwind classes to be applied to the component.
15
- */
16
- className?: string;
17
- /**
18
- * Test id to be used for the component.
19
- */
20
- dataTestId?: string;
21
- /**
22
- * An React element to render before the label.
23
- * This is typically used to render an icon.
24
- *
25
- */
26
- prefix?: React.ReactNode;
27
- /**
28
- * An React element to render after the label.
29
- * This is typically used to render an icon.
30
- *
31
- */
32
- suffix?: JSX.Element;
33
- /**
34
- * An boolean flag to turn on/off selected state
35
- * This is typically used highlight that item is selected
36
- *
37
- * @memberof IMenuItemProps
38
- */
39
- selected?: boolean;
40
- /**
41
- * OnClick event handler it is thrown on root element of the component tree
42
- *
43
- * @memberof IMenuItemProps
44
- */
45
- onClick?: React.MouseEventHandler<HTMLDivElement>;
46
- /**
47
- * An boolean flag to turn on/off focused state
48
- * This is typically used for keyboard navigation
49
- *
50
- * @memberof IMenuItemProps
51
- */
52
- focused?: boolean;
53
- /**
54
- * A boolean prop to set menu item to disabled state
55
- * used in disabled select options
56
- */
57
- disabled?: boolean;
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
+ * Additional tailwind classes to be applied to the component.
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Test id to be used for the component.
19
+ */
20
+ dataTestId?: string;
21
+ /**
22
+ * An React element to render before the label.
23
+ * This is typically used to render an icon.
24
+ *
25
+ */
26
+ prefix?: React.ReactNode;
27
+ /**
28
+ * An React element to render after the label.
29
+ * This is typically used to render an icon.
30
+ *
31
+ */
32
+ suffix?: JSX.Element;
33
+ /**
34
+ * An boolean flag to turn on/off selected state
35
+ * This is typically used highlight that item is selected
36
+ *
37
+ * @memberof IMenuItemProps
38
+ */
39
+ selected?: boolean;
40
+ /**
41
+ * OnClick event handler it is thrown on root element of the component tree
42
+ *
43
+ * @memberof IMenuItemProps
44
+ */
45
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
46
+ /**
47
+ * An boolean flag to turn on/off focused state
48
+ * This is typically used for keyboard navigation
49
+ *
50
+ * @memberof IMenuItemProps
51
+ */
52
+ focused?: boolean;
53
+ /**
54
+ * A boolean prop to set menu item to disabled state
55
+ * used in disabled select options
56
+ */
57
+ disabled?: boolean;
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,36 +1,36 @@
1
- /// <reference types="react" />
2
- import { MenuItemProps } from "../MenuItem/MenuItem";
3
- export interface MenuListItemProps extends MenuItemProps {
4
- showDivider?: boolean;
5
- }
6
- export interface MenuListProps {
7
- /**
8
- * Additional tailwind classes to be applied to the component.
9
- */
10
- className?: string;
11
- /**
12
- * Test id to be used for the component.
13
- */
14
- dataTestId?: string;
15
- /**
16
- * List of menu items to be rendered.
17
- */
18
- children: React.ReactNode;
19
- /**
20
- * List of menu items to be rendered.
21
- */
22
- showDivider?: boolean;
23
- /**
24
- * When enabled the menu list padding will be removed, and a grid will be applied to keep the first column "sticky".
25
- *
26
- * @default false
27
- */
28
- withStickyHeader?: boolean;
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
+ export interface MenuListItemProps extends MenuItemProps {
4
+ showDivider?: boolean;
5
+ }
6
+ export interface MenuListProps {
7
+ /**
8
+ * Additional tailwind classes to be applied to the component.
9
+ */
10
+ className?: string;
11
+ /**
12
+ * Test id to be used for the component.
13
+ */
14
+ dataTestId?: string;
15
+ /**
16
+ * List of menu items to be rendered.
17
+ */
18
+ children: React.ReactNode;
19
+ /**
20
+ * List of menu items to be rendered.
21
+ */
22
+ showDivider?: boolean;
23
+ /**
24
+ * When enabled the menu list padding will be removed, and a grid will be applied to keep the first column "sticky".
25
+ *
26
+ * @default false
27
+ */
28
+ withStickyHeader?: boolean;
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,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 {};
@@ -1,3 +1,3 @@
1
- export * from "./MenuItem/MenuItem";
2
- export * from "./MenuList/MenuList";
3
- export * from "./MoreMenu/MoreMenu";
1
+ export * from "./MenuItem/MenuItem";
2
+ export * from "./MenuList/MenuList";
3
+ export * from "./MoreMenu/MoreMenu";