@trackunit/react-components 0.0.36

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 (126) hide show
  1. package/README.md +36 -0
  2. package/common/CommonProps.d.ts +17 -0
  3. package/common/StorybookProps.d.ts +6 -0
  4. package/common/index.d.ts +3 -0
  5. package/common/useContainerProps.d.ts +8 -0
  6. package/components/NumberField/NumberField.d.ts +15 -0
  7. package/components/NumberInput/NumberInput.d.ts +12 -0
  8. package/components/TextInput/TextInput.d.ts +12 -0
  9. package/components/alert/Alert.d.ts +69 -0
  10. package/components/alert/index.d.ts +1 -0
  11. package/components/badge/Badge.d.ts +74 -0
  12. package/components/badge/index.d.ts +1 -0
  13. package/components/baseInput/BaseInput.d.ts +82 -0
  14. package/components/baseInput/index.d.ts +1 -0
  15. package/components/buttons/button/Button.d.ts +55 -0
  16. package/components/buttons/icon-button/IconButton.d.ts +33 -0
  17. package/components/buttons/index.d.ts +4 -0
  18. package/components/buttons/shared/ButtonProps.d.ts +61 -0
  19. package/components/buttons/shared/helpers.d.ts +9 -0
  20. package/components/buttons/star-button/StarButton.d.ts +7 -0
  21. package/components/card/Card.d.ts +33 -0
  22. package/components/card/CardBody.d.ts +21 -0
  23. package/components/card/CardFooter.d.ts +16 -0
  24. package/components/card/CardHeader.d.ts +39 -0
  25. package/components/card/DensityContainer.d.ts +36 -0
  26. package/components/card/index.d.ts +5 -0
  27. package/components/chart/Chart.d.ts +105 -0
  28. package/components/chart/index.d.ts +1 -0
  29. package/components/checkbox/CheckIcon.d.ts +4 -0
  30. package/components/checkbox/Checkbox.d.ts +53 -0
  31. package/components/checkbox/IndeterminateIcon.d.ts +4 -0
  32. package/components/checkbox/index.d.ts +1 -0
  33. package/components/collapse/Collapse.d.ts +33 -0
  34. package/components/collapse/index.d.ts +1 -0
  35. package/components/copyableText/CopyableText.d.ts +8 -0
  36. package/components/copyableText/index.d.ts +1 -0
  37. package/components/dateField/DateField.d.ts +46 -0
  38. package/components/dateField/index.d.ts +1 -0
  39. package/components/dayPicker/DayPicker.d.ts +9 -0
  40. package/components/dayPicker/DayPickerPopover.d.ts +16 -0
  41. package/components/dayPicker/DayRangePicker.d.ts +11 -0
  42. package/components/dayPicker/index.d.ts +21 -0
  43. package/components/dayPicker/useLocale.d.ts +2 -0
  44. package/components/drawer/Drawer.d.ts +32 -0
  45. package/components/drawer/index.d.ts +1 -0
  46. package/components/formGroup/FormGroup.d.ts +42 -0
  47. package/components/heading/Heading.d.ts +34 -0
  48. package/components/heading/index.d.ts +1 -0
  49. package/components/icon/Icon.d.ts +49 -0
  50. package/components/index.d.ts +37 -0
  51. package/components/indicator/Indicator.d.ts +34 -0
  52. package/components/indicator/index.d.ts +1 -0
  53. package/components/label/Label.d.ts +33 -0
  54. package/components/label/index.d.ts +1 -0
  55. package/components/legendItem/LegendItem.d.ts +11 -0
  56. package/components/legendItem/index.d.ts +1 -0
  57. package/components/menu/MenuButton.d.ts +7 -0
  58. package/components/menu/MenuItem.d.ts +9 -0
  59. package/components/menu/MenuList.d.ts +11 -0
  60. package/components/menu/index.d.ts +3 -0
  61. package/components/modal/Modal.d.ts +42 -0
  62. package/components/modal/ModalBackdrop.d.ts +7 -0
  63. package/components/modal/index.d.ts +3 -0
  64. package/components/modal/useModal.d.ts +15 -0
  65. package/components/multiRowTableCell/MultiRowTableCell.d.ts +30 -0
  66. package/components/multiRowTableCell/index.d.ts +1 -0
  67. package/components/pageHeading/PageHeading.d.ts +9 -0
  68. package/components/pageHeading/index.d.ts +1 -0
  69. package/components/popover/AnimatedPopover.d.ts +15 -0
  70. package/components/popover/PopoverList.d.ts +6 -0
  71. package/components/popover/PopoverListItem.d.ts +16 -0
  72. package/components/popover/PopoverTitle.d.ts +8 -0
  73. package/components/popover/index.d.ts +5 -0
  74. package/components/popover/usePopover.d.ts +24 -0
  75. package/components/prompt/Prompt.d.ts +10 -0
  76. package/components/prompt/index.d.ts +1 -0
  77. package/components/radioGroup/RadioGroup.d.ts +14 -0
  78. package/components/radioGroup/RadioGroupContext.d.ts +10 -0
  79. package/components/radioGroup/RadioItem.d.ts +8 -0
  80. package/components/radioGroup/index.d.ts +2 -0
  81. package/components/select/CreatableSelect.d.ts +4 -0
  82. package/components/select/FieldContainer.d.ts +14 -0
  83. package/components/select/Select.d.ts +4 -0
  84. package/components/select/index.d.ts +3 -0
  85. package/components/select/shared.d.ts +83 -0
  86. package/components/skeletonLines/SkeletonLines.d.ts +41 -0
  87. package/components/skeletonLines/index.d.ts +1 -0
  88. package/components/spacer/Spacer.d.ts +21 -0
  89. package/components/spacer/index.d.ts +1 -0
  90. package/components/spinner/Spinner.d.ts +24 -0
  91. package/components/spinner/index.d.ts +1 -0
  92. package/components/text/Text.d.ts +79 -0
  93. package/components/text/index.d.ts +1 -0
  94. package/components/textArea/TextArea.d.ts +25 -0
  95. package/components/textArea/index.d.ts +1 -0
  96. package/components/textField/TextField.d.ts +23 -0
  97. package/components/textField/TextLenghtIndicator.d.ts +6 -0
  98. package/components/textField/index.d.ts +1 -0
  99. package/components/theme/DefaultTheme.d.ts +2 -0
  100. package/components/theme/index.d.ts +1 -0
  101. package/components/tip/Tip.d.ts +13 -0
  102. package/components/tip/index.d.ts +1 -0
  103. package/components/toggle/Toggle.d.ts +15 -0
  104. package/components/toggle/index.d.ts +1 -0
  105. package/components/tooltip/Tooltip.d.ts +69 -0
  106. package/components/tooltip/index.d.ts +1 -0
  107. package/constants/colors.d.ts +65 -0
  108. package/constants/index.d.ts +1 -0
  109. package/hooks/index.d.ts +3 -0
  110. package/hooks/useDebounce.d.ts +1 -0
  111. package/hooks/useLocalStorage.d.ts +2 -0
  112. package/hooks/useTimeout.d.ts +9 -0
  113. package/index.d.ts +5 -0
  114. package/index.js +3829 -0
  115. package/layout/helper/MinTopFullContentLayout.d.ts +12 -0
  116. package/layout/index.d.ts +7 -0
  117. package/layout/responsive/FilterListMapLayout.d.ts +19 -0
  118. package/layout/responsive/FullWidthRepeatingLayout.d.ts +16 -0
  119. package/layout/responsive/GridArea.d.ts +12 -0
  120. package/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +26 -0
  121. package/layout/responsive/TitleNavContentLayout.d.ts +6 -0
  122. package/layout/responsive/TwoColumnLayout.d.ts +6 -0
  123. package/package.json +32 -0
  124. package/test-config/jest.setup.d.ts +1 -0
  125. package/test-utils/hooks.d.ts +4 -0
  126. package/test-utils/test-utils.d.ts +5 -0
@@ -0,0 +1,36 @@
1
+ import * as React from "react";
2
+ import { CommonProps, Density } from "../../common/CommonProps";
3
+ /**
4
+ * @summary
5
+ * For applying auto padding and gap to a Card or Modal or whatever.
6
+ *
7
+ * @description
8
+ * Density applies gap and padding.
9
+ * The padding should live here, and not on the Card itself, as to not inset the scrollbar in case of overflow.
10
+ */
11
+ interface ContainerProps extends CommonProps {
12
+ /**
13
+ * The density of the card components.
14
+ * "compact" = 12px gap and padding.
15
+ * "comfortable" = 16px gap and padding.
16
+ * "spacious" = 16px gap, 26px padding.
17
+ *
18
+ * @type {("none" | "compact" | "comfortable" | "spacious" | "auto")}
19
+ * @memberof ContainerProps
20
+ */
21
+ $density?: Density;
22
+ /**
23
+ * Set gap to be 0px (not preferable)
24
+ */
25
+ $disableGap?: boolean;
26
+ /**
27
+ * The flex direction of the Card. Defaults to "column".
28
+ *
29
+ * @type {("row" | "row-reverse" | "column" | "column-reverse")}
30
+ * @memberof ContainerProps
31
+ */
32
+ $direction?: "row" | "row-reverse" | "column" | "column-reverse";
33
+ children?: React.ReactNode;
34
+ }
35
+ export declare const DensityContainer: ({ children, className, dataTestId, $density, $disableGap, $direction, }: ContainerProps) => JSX.Element;
36
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from "./Card";
2
+ export * from "./CardBody";
3
+ export * from "./CardFooter";
4
+ export * from "./CardHeader";
5
+ export * from "./DensityContainer";
@@ -0,0 +1,105 @@
1
+ import * as React from "react";
2
+ export interface IOptionsType {
3
+ [key: string]: any;
4
+ }
5
+ export interface IChartProps {
6
+ /**
7
+ * Option values for Echart.
8
+ *
9
+ * @type {IOptionsType}
10
+ * @memberof IChartProps
11
+ */
12
+ options: IOptionsType;
13
+ /**
14
+ * Whether or not to low the preloader.
15
+ *
16
+ * @type {boolean}
17
+ * @memberof IChartProps
18
+ */
19
+ showLoading?: boolean;
20
+ /**
21
+ * onClick event.
22
+ *
23
+ * @memberof IChartProps
24
+ */
25
+ onClick?: (event: any) => void;
26
+ /**
27
+ * onDataZoom event.
28
+ *
29
+ * @memberof IChartProps
30
+ */
31
+ onDataZoom?: (event: any) => void;
32
+ /**
33
+ * onBrush event.
34
+ *
35
+ * @memberof IChartProps
36
+ */
37
+ onBrush?: (event: any) => void;
38
+ /**
39
+ * Event fired when brush is selected.
40
+ *
41
+ * @memberof IChartProps
42
+ */
43
+ onBrushSelected?: (event: any) => void;
44
+ /**
45
+ * Evebt fired when mouse leaves the chart.
46
+ *
47
+ * @memberof IChartProps
48
+ */
49
+ mouseLeaveChart?: () => void;
50
+ /**
51
+ * class values to be passed to the component.
52
+ *
53
+ * @type string
54
+ * @memberof IChartProps
55
+ */
56
+ className?: string;
57
+ /**
58
+ * CSS styles for the chart.
59
+ *
60
+ * @type {Record<string, unknown>}
61
+ * @memberof IChartProps
62
+ */
63
+ style?: Record<string, string | number>;
64
+ /**
65
+ * To denote of chart is ready or not.
66
+ *
67
+ * @memberof IChartProps
68
+ */
69
+ onChartReady?: (chart: any) => void;
70
+ /**
71
+ * Whether to merge with previous option.
72
+ *
73
+ * @type {boolean}
74
+ * @memberof IChartProps
75
+ */
76
+ merge?: boolean;
77
+ /**
78
+ * Values for the loading component.
79
+ *
80
+ * @type {{ text: string }}
81
+ * @memberof IChartProps
82
+ */
83
+ loadingOption?: {
84
+ text: string;
85
+ };
86
+ /**
87
+ * Time-zone label.
88
+ *
89
+ * @type React.ReactNode
90
+ * @memberof IChartProps
91
+ */
92
+ timezoneLabel?: React.ReactNode;
93
+ /**
94
+ * Type of rendered used. Either "svg" or "canvas".
95
+ *
96
+ * @type {("svg" | "canvas")}
97
+ * @memberof IChartProps
98
+ */
99
+ renderer?: "svg" | "canvas";
100
+ }
101
+ /**
102
+ * A wrapper component for Echarts.
103
+ * Handles events and click functionality.
104
+ */
105
+ export declare const Chart: ({ options, showLoading, className, style, onChartReady, onClick, onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, merge, loadingOption, timezoneLabel, renderer, }: IChartProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Chart";
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const CheckIcon: ({ className }: {
3
+ className?: string | undefined;
4
+ }) => JSX.Element;
@@ -0,0 +1,53 @@
1
+ import * as React from "react";
2
+ import { CommonProps } from "../../common/CommonProps";
3
+ export interface CheckboxProps extends CommonProps, React.InputHTMLAttributes<HTMLInputElement> {
4
+ /**
5
+ * A string element to be displayed as a label
6
+ *
7
+ * @type string
8
+ * @memberof CheckboxProps
9
+ */
10
+ label?: React.ReactNode;
11
+ /**
12
+ * An boolean flag to set checkbox to disabled state
13
+ *
14
+ * @type boolean
15
+ * @memberof CheckboxProps
16
+ */
17
+ disabled?: boolean;
18
+ /**
19
+ * An boolean flag to set invalid mode
20
+ * can be used for handling errors
21
+ *
22
+ * @type boolean
23
+ * @memberof CheckboxProps
24
+ */
25
+ isInvalid?: boolean;
26
+ /**
27
+ * An boolean flag to set checkbox to readonly mode
28
+ *
29
+ * @type boolean
30
+ * @memberof CheckboxProps
31
+ */
32
+ readOnly?: boolean;
33
+ /**
34
+ * An string element to be used as input name
35
+ *
36
+ * @type React.ReactNode
37
+ * @memberof CheckboxProps
38
+ */
39
+ name?: string;
40
+ /**
41
+ * An boolean flag to set checkbox to intermediate state
42
+ *
43
+ * @type boolean
44
+ * @memberof CheckboxProps
45
+ */
46
+ indeterminate?: boolean;
47
+ }
48
+ /**
49
+ * A base checkbox component that can be used for boolean inputs, selectors etc.
50
+ * A reference to the input element is provided as the `ref` prop.
51
+ * Extends props from [React.InputHTMLAttributes](https://reactjs.org/docs/dom-elements.html#input)
52
+ */
53
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const IndeterminateIcon: ({ className }: {
3
+ className?: string | undefined;
4
+ }) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Checkbox";
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ import { CommonProps } from "../../common/CommonProps";
3
+ export interface CollapseProps extends CommonProps {
4
+ id: string;
5
+ /**
6
+ * Expands the collapse component during initialization.
7
+ *
8
+ * @type {boolean}
9
+ * @memberof CollapseProps
10
+ */
11
+ initialExpanded?: boolean;
12
+ /**
13
+ * onToggle event.
14
+ *
15
+ * @memberof CollapseProps
16
+ */
17
+ onToggle?: (event: React.MouseEvent<HTMLDivElement>, expanded: boolean) => void;
18
+ /**
19
+ * Child nodes.
20
+ *
21
+ * @type React.ReactNode
22
+ * @memberof CollapseProps
23
+ */
24
+ children: React.ReactNode;
25
+ /**
26
+ * Label to be displayed.
27
+ *
28
+ * @type React.ReactNode
29
+ * @memberof CollapseProps
30
+ */
31
+ label: React.ReactNode;
32
+ }
33
+ export declare const Collapse: ({ id, initialExpanded, onToggle, label, children, className, dataTestId, }: CollapseProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Collapse";
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface CopyableTextProps {
3
+ text?: string;
4
+ alternativeText?: string;
5
+ dataTestId?: string;
6
+ }
7
+ export declare const CopyableText: ({ text, alternativeText, dataTestId }: CopyableTextProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./CopyableText";
@@ -0,0 +1,46 @@
1
+ /// <reference types="react" />
2
+ import { Matcher } from "react-day-picker";
3
+ import { BaseInputProps } from "../baseInput";
4
+ export interface DateFieldProps extends Pick<BaseInputProps, "placeholder" | "id" | "dataTestId" | "onChange"> {
5
+ /**
6
+ * A text label to be displayed next to the indicator
7
+ *
8
+ * @type string
9
+ * @memberof DateFieldProps
10
+ */
11
+ label?: string;
12
+ /**
13
+ * A text to be displayed under the input with a short description of field purpose
14
+ *
15
+ * @type string
16
+ * @memberof DateFieldProps
17
+ */
18
+ description?: string;
19
+ /**
20
+ * A default value to be displayed by a input field
21
+ *
22
+ * @type string
23
+ * @memberof DateFieldProps
24
+ */
25
+ defaultValue?: string;
26
+ /**
27
+ * A flag that can be used to disable the input, default value is false
28
+ *
29
+ * @type {boolean}
30
+ * @memberof DateFieldProps
31
+ */
32
+ disabled?: boolean;
33
+ /**
34
+ * Specification of dates not allowed to be selected - i the form of react-day-picker matcher
35
+ * @type boolean
36
+ * @memberof DateFieldProps
37
+ */
38
+ disabledDays?: Matcher | Matcher[] | undefined;
39
+ /**
40
+ * A flag that can be set to true to disallow the user to deselect a date. (if false the user can click the selected date to deselect)
41
+ * @type Matcher | Matcher[] | undefined
42
+ * @memberof DateFieldProps
43
+ */
44
+ preventDeselect?: boolean;
45
+ }
46
+ export declare const DateField: import("react").ForwardRefExoticComponent<DateFieldProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ export * from "./DateField";
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Matcher } from "react-day-picker";
3
+ export interface DayPickerProps {
4
+ onDaySelect?: (day: Date) => void;
5
+ disabledDays: Matcher | Matcher[] | undefined;
6
+ selectedDays: Matcher | Matcher[] | undefined;
7
+ language: string;
8
+ }
9
+ export declare const DayPicker: ({ onDaySelect, disabledDays, selectedDays, language, ...rest }: DayPickerProps) => JSX.Element;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { Matcher } from "react-day-picker";
3
+ import { ButtonIntent, ButtonSize } from "../buttons";
4
+ import { PopoverPlacement } from "../popover";
5
+ export interface DayPickerPopoverProps {
6
+ disabledDays?: Matcher | Matcher[] | undefined;
7
+ className?: string;
8
+ onDaySelect: (day: Date) => void;
9
+ selectedDay?: Date;
10
+ intent?: ButtonIntent;
11
+ size?: ButtonSize;
12
+ placement?: PopoverPlacement;
13
+ buttonContent: JSX.Element;
14
+ language: string;
15
+ }
16
+ export declare const DayPickerPopover: ({ disabledDays, className, selectedDay, onDaySelect, intent, placement, size, buttonContent, language, }: DayPickerPopoverProps) => JSX.Element;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { DateRange, Matcher } from "react-day-picker";
3
+ export declare type IDateRange = DateRange;
4
+ export interface DayRangePickerProps {
5
+ onRangeSelect?: (range: IDateRange | undefined) => void;
6
+ selectedDays: IDateRange;
7
+ dataTestId?: string;
8
+ disabledDays?: Matcher | Matcher[];
9
+ language: string;
10
+ }
11
+ export declare const DayRangePicker: ({ onRangeSelect, selectedDays, disabledDays, dataTestId, language, }: DayRangePickerProps) => JSX.Element;
@@ -0,0 +1,21 @@
1
+ export interface TimeZone {
2
+ /**
3
+ * The unique id of the timezone
4
+ *
5
+ * @example "America/Denver"
6
+ */
7
+ id: string;
8
+ /**
9
+ * The human-readable name of the timezone. Combines id and offset.
10
+ *
11
+ * @example "America/Denver (-06:00 MDT)"
12
+ */
13
+ name: string;
14
+ /**
15
+ * @example "-06:00 MDT"
16
+ */
17
+ offset: string;
18
+ }
19
+ export * from "./DayPicker";
20
+ export * from "./DayPickerPopover";
21
+ export * from "./DayRangePicker";
@@ -0,0 +1,2 @@
1
+ import { Locale } from "date-fns";
2
+ export declare const useLocale: (language: string) => Locale;
@@ -0,0 +1,32 @@
1
+ import * as React from "react";
2
+ import { CommonProps } from "../../common/CommonProps";
3
+ export interface DrawerProps extends CommonProps {
4
+ /**
5
+ * Child nodes
6
+ *
7
+ * @type React.ReactNode
8
+ * @memberof DrawerProps
9
+ */
10
+ children: React.ReactNode;
11
+ /**
12
+ * Whether the drawer is open or not.
13
+ *
14
+ * @type {boolean}
15
+ * @memberof DrawerProps
16
+ */
17
+ isOpen?: boolean;
18
+ /**
19
+ * OnClose event.
20
+ *
21
+ * @memberof DrawerProps
22
+ */
23
+ onClose?: () => void;
24
+ /**
25
+ * Whether the drawer is displayed in-line or not.
26
+ *
27
+ * @type {boolean}
28
+ * @memberof DrawerProps
29
+ */
30
+ inline?: boolean;
31
+ }
32
+ export declare const Drawer: ({ children, isOpen, onClose, inline, className, dataTestId }: DrawerProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Drawer";
@@ -0,0 +1,42 @@
1
+ import * as React from "react";
2
+ import { CommonProps } from "../../common";
3
+ export interface FormGroupProps extends CommonProps {
4
+ /**
5
+ * The label for the form group.
6
+ *
7
+ * @type string | React.ReactNode
8
+ * @memberof FormGroupProps
9
+ */
10
+ label: string | React.ReactNode;
11
+ /**
12
+ * Content to display in the tooltip when hovering the ? icon next to the label.
13
+ *
14
+ * @type string | React.ReactNode
15
+ * @memberof FormGroupProps
16
+ */
17
+ tip?: string | React.ReactNode;
18
+ /**
19
+ * A string to display under the input element to help the user understand the input.
20
+ *
21
+ * @type string
22
+ * @memberof FormGroupProps
23
+ */
24
+ helpText?: string;
25
+ /**
26
+ * An addon element to render to the right under the input element.
27
+ * Used for diaplying maxLength etc.
28
+ *
29
+ * @type string | React.ReactNode
30
+ * @memberof FormGroupProps
31
+ */
32
+ helpAddon?: string | React.ReactNode;
33
+ /**
34
+ * If true the input is rendered in its invalid state.
35
+ *
36
+ * @type boolean
37
+ * @memberof FormGroupProps
38
+ */
39
+ isInvalid?: boolean;
40
+ children?: React.ReactNode;
41
+ }
42
+ export declare const FormGroup: ({ isInvalid, helpText, helpAddon, tip, className, dataTestId, label, children, }: FormGroupProps) => JSX.Element;
@@ -0,0 +1,34 @@
1
+ import * as React from "react";
2
+ import { CommonProps } from "../../common/CommonProps";
3
+ export declare type HeadingVariant = "primary" | "secondary" | "tertiary" | "subtitle";
4
+ export interface HeadingProps extends CommonProps {
5
+ /**
6
+ * Child Nodes.
7
+ *
8
+ * @type React.ReactNode
9
+ * @memberof HeadingProps
10
+ */
11
+ children: React.ReactNode;
12
+ /**
13
+ * Size of heading. Accepted values: "primary", "secondary", "tertiary", "subtitle".
14
+ *
15
+ * @type {HeadingVariant}
16
+ * @memberof HeadingProps
17
+ */
18
+ variant: HeadingVariant;
19
+ /**
20
+ * Whether the heading uses inverted styles or not.
21
+ *
22
+ * @type {boolean}
23
+ * @memberof HeadingProps
24
+ */
25
+ inverted?: boolean;
26
+ /**
27
+ * Whether the heading is a subtitle or not.
28
+ *
29
+ * @type {boolean}
30
+ * @memberof HeadingProps
31
+ */
32
+ subtle?: boolean;
33
+ }
34
+ export declare const Heading: ({ children, variant, inverted, subtle, className, dataTestId, }: HeadingProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Heading";
@@ -0,0 +1,49 @@
1
+ import { HeroIconName, TrackunitIconName } from "@trackunit/ui-icons";
2
+ import * as React from "react";
3
+ import { CommonProps } from "../../common/CommonProps";
4
+ import { Colors } from "../../constants/colors";
5
+ export interface IIconProps extends CommonProps {
6
+ /**
7
+ * The name of the icon to be rendered.
8
+ * HeroIconName and TrackunitIconName are supported.
9
+ *
10
+ * @type {(TrackunitIconName | HeroIconName)}
11
+ * @memberof IIconProps
12
+ */
13
+ name: TrackunitIconName | HeroIconName;
14
+ /**
15
+ * The color of the icon.
16
+ * Supports any colors from the theme.
17
+ * Custom colors can be used by setting a text color in the className.
18
+ *
19
+ * @type {Colors}
20
+ * @memberof IIconProps
21
+ */
22
+ color?: Colors;
23
+ /**
24
+ * The size of the icon.
25
+ * Small = 16x16px, Normal = 20x20px, Large = 24x24px.
26
+ * Default value is Large.
27
+ * If a custom size is needed, set it in the className.
28
+ *
29
+ * @type {("small" | "normal" | "large")}
30
+ * @memberof IIconProps
31
+ */
32
+ size?: "small" | "normal" | "large";
33
+ /**
34
+ * Select if the icon should be rendered as solid or outline.
35
+ * Default value depends on the Size prop, small == solid, normal == solid, large == outline.
36
+ * Trackunit icons might not support both outline and Solid.
37
+ *
38
+ * @type {("solid" | "outline")}
39
+ * @memberof IIconProps
40
+ */
41
+ type?: "solid" | "outline";
42
+ onClick?: (event: React.MouseEvent<HTMLSpanElement>) => void;
43
+ /**
44
+ * @deprecated
45
+ */
46
+ fillColor?: string;
47
+ forwardedRef?: React.RefObject<HTMLSpanElement>;
48
+ }
49
+ export declare const Icon: ({ name, size, className, dataTestId, color, onClick, fillColor, type, forwardedRef, }: IIconProps) => JSX.Element | null;
@@ -0,0 +1,37 @@
1
+ export * from "./alert";
2
+ export * from "./badge";
3
+ export * from "./baseInput";
4
+ export * from "./buttons";
5
+ export * from "./card";
6
+ export * from "./chart";
7
+ export * from "./checkbox";
8
+ export * from "./collapse";
9
+ export * from "./copyableText";
10
+ export * from "./dateField";
11
+ export * from "./dayPicker";
12
+ export * from "./formGroup/FormGroup";
13
+ export * from "./heading";
14
+ export * from "./icon/Icon";
15
+ export * from "./indicator";
16
+ export * from "./label";
17
+ export * from "./legendItem";
18
+ export * from "./menu";
19
+ export * from "./modal";
20
+ export * from "./multiRowTableCell";
21
+ export * from "./NumberField/NumberField";
22
+ export * from "./NumberInput/NumberInput";
23
+ export * from "./pageHeading";
24
+ export * from "./popover";
25
+ export * from "./prompt";
26
+ export * from "./radioGroup";
27
+ export * from "./select";
28
+ export * from "./skeletonLines";
29
+ export * from "./spacer";
30
+ export * from "./spinner";
31
+ export * from "./text";
32
+ export * from "./textArea";
33
+ export * from "./textField";
34
+ export * from "./TextInput/TextInput";
35
+ export * from "./tip";
36
+ export * from "./toggle";
37
+ export * from "./tooltip";
@@ -0,0 +1,34 @@
1
+ /// <reference types="react" />
2
+ import { CommonProps } from "../../common/CommonProps";
3
+ import { Colors } from "../../constants/colors";
4
+ export interface IndicatorProps extends CommonProps {
5
+ /**
6
+ * The icon to be rendered inside the indicator componeent
7
+ *
8
+ * @type {JSX.Element}
9
+ * @memberof IndicatorProps
10
+ */
11
+ icon: JSX.Element;
12
+ /**
13
+ * A color token used to style the icon and the icon background
14
+ *
15
+ * @type {Colors}
16
+ * @memberof IndicatorProps
17
+ */
18
+ color?: Colors;
19
+ /**
20
+ * A text label to be displayed next to the indicator
21
+ *
22
+ * @type string
23
+ * @memberof IndicatorProps
24
+ */
25
+ label?: string;
26
+ /**
27
+ * A boolean parameter to display or hide icon background, default value is true
28
+ *
29
+ * @type string
30
+ * @memberof IndicatorProps
31
+ */
32
+ withBackground?: boolean;
33
+ }
34
+ export declare const Indicator: ({ dataTestId, icon, label, color, withBackground, ...rest }: IndicatorProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Indicator";
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ import { CommonProps } from "../../common/CommonProps";
3
+ export interface LabelProps extends CommonProps {
4
+ /**
5
+ * ID of the label.
6
+ *
7
+ * @type string
8
+ * @memberof LabelProps
9
+ */
10
+ id?: string;
11
+ /**
12
+ * Specifies the element to which the label belongs to.
13
+ *
14
+ * @type {(string | false)}
15
+ * @memberof LabelProps
16
+ */
17
+ htmlFor: string | false;
18
+ /**
19
+ * The label value.
20
+ *
21
+ * @type React.ReactNode
22
+ * @memberof LabelProps
23
+ */
24
+ label?: React.ReactNode;
25
+ /**
26
+ * Description for the label.
27
+ *
28
+ * @type React.ReactNode
29
+ * @memberof LabelProps
30
+ */
31
+ description?: React.ReactNode;
32
+ }
33
+ export declare const Label: ({ id, htmlFor, label, description, className, dataTestId }: LabelProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Label";