@trackunit/react-components 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/common/CommonProps.d.ts +2 -2
- package/src/components/ActionButton/ActionButton.d.ts +2 -2
- package/src/components/Alert/Alert.d.ts +2 -2
- package/src/components/Badge/Badge.d.ts +1 -1
- package/src/components/BaseInput/BaseInput.d.ts +2 -2
- package/src/components/Card/Card.d.ts +1 -1
- package/src/components/Card/CardBody.d.ts +1 -1
- package/src/components/DateField/DateField.d.ts +1 -1
- package/src/components/DateInput/DateInput.d.ts +1 -1
- package/src/components/DayPicker/DayRangePicker.d.ts +1 -1
- package/src/components/Drawer/Drawer.d.ts +1 -1
- package/src/components/Heading/Heading.d.ts +1 -1
- package/src/components/Menu/MoreMenu/MoreMenu.d.ts +4 -4
- package/src/components/Modal/Modal.d.ts +1 -1
- package/src/components/NumberField/NumberField.d.ts +1 -1
- package/src/components/NumberInput/NumberInput.d.ts +1 -1
- package/src/components/PieChart/PieChart.d.ts +1 -1
- package/src/components/Popover/Popover.d.ts +3 -3
- package/src/components/Select/CreatableSelect.d.ts +1 -1
- package/src/components/Select/TagWithWidth.d.ts +1 -1
- package/src/components/Sidebar/Sidebar.d.ts +1 -1
- package/src/components/Sidebar/useOverflowItems.d.ts +1 -1
- package/src/components/Tag/Tag.d.ts +1 -1
- package/src/components/Text/Text.d.ts +3 -3
- package/src/components/TextArea/TextArea.d.ts +2 -2
- package/src/components/TextAreaField/TextAreaField.d.ts +1 -1
- package/src/components/TextField/TextField.d.ts +1 -1
- package/src/components/TextInput/TextInput.d.ts +1 -1
- package/src/components/Toggle/Toggle.d.ts +1 -1
- package/src/components/buttons/shared/ButtonProps.d.ts +3 -3
- package/src/layout/responsive/FullWidthRepeatingLayout.d.ts +1 -1
- package/src/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@trackunit/tailwind-styled-components": "0.0.51",
|
|
10
10
|
"react": "18.2.0",
|
|
11
11
|
"@trackunit/ui-design-tokens": "0.0.53",
|
|
12
|
-
"@trackunit/react-core-contexts-test": "0.1.
|
|
12
|
+
"@trackunit/react-core-contexts-test": "0.1.17",
|
|
13
13
|
"echarts-for-react": "3.0.2",
|
|
14
14
|
"echarts": "5.4.0",
|
|
15
15
|
"uuid": "8.3.2",
|
|
@@ -8,5 +8,5 @@ export interface CommonProps {
|
|
|
8
8
|
*/
|
|
9
9
|
dataTestId?: string;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type Density = "none" | "compact" | "comfortable" | "spacious" | "auto";
|
|
12
|
+
export type Size = "small" | "medium" | "large";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CommonProps } from "../../common";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type ActionType = "PHONE_NUMBER" | "WEB_ADDRESS" | "EMAIL";
|
|
4
|
+
type FieldSize = "small" | "medium";
|
|
5
5
|
interface ActionButtonProps extends CommonProps {
|
|
6
6
|
/**
|
|
7
7
|
* The type of action performed when clicking the button.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IntentColors } from "@trackunit/ui-design-tokens";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { CommonProps } from "../../common/CommonProps";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type AlertActionType = "primary" | "secondary";
|
|
5
|
+
export type AlertAction = {
|
|
6
6
|
label: string;
|
|
7
7
|
onClick: () => void;
|
|
8
8
|
loading?: boolean;
|
|
@@ -31,7 +31,7 @@ interface BaseBadgeProps extends CommonProps {
|
|
|
31
31
|
*/
|
|
32
32
|
hideZero?: boolean;
|
|
33
33
|
}
|
|
34
|
-
export
|
|
34
|
+
export type BadgeProps = BaseBadgeProps;
|
|
35
35
|
/**
|
|
36
36
|
* The Badge component is used to display a notification badge with an optional number value.
|
|
37
37
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CommonProps } from "../../common";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type FilteredInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "prefix" | "suffix">;
|
|
4
|
+
type FieldSize = "small" | "medium";
|
|
5
5
|
export interface BaseInputProps extends FilteredInputProps, CommonProps {
|
|
6
6
|
/**
|
|
7
7
|
* A React element to render before the text in the input.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
3
|
export declare const ROLE_CARD = "region";
|
|
4
|
-
|
|
4
|
+
type Overflow = "visible" | "hidden" | "scroll" | "auto";
|
|
5
5
|
export interface CardProps extends CommonProps, React.InputHTMLAttributes<HTMLDivElement> {
|
|
6
6
|
/**
|
|
7
7
|
* Whether the card should have full height or not.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CommonProps, Density } from "../../common/CommonProps";
|
|
3
|
-
|
|
3
|
+
type Overflow = "visible" | "hidden" | "scroll" | "auto" | "inherit";
|
|
4
4
|
export interface CardBodyProps extends CommonProps {
|
|
5
5
|
/**
|
|
6
6
|
* Tells the body how to handle overflowing elements.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DateInputProps } from "../DateInput/DateInput";
|
|
3
3
|
import { FormGroupProps } from "../FormGroup/FormGroup";
|
|
4
|
-
|
|
4
|
+
type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
|
|
5
5
|
export interface DateFieldProps extends DateInputProps, FormGroupExposedProps {
|
|
6
6
|
/**
|
|
7
7
|
* If a value is set, the field is rendered in its invalid state.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseInputProps } from "../BaseInput";
|
|
3
|
-
|
|
3
|
+
type BaseInputExposedProps = Omit<BaseInputProps, "defaultValue" | "min" | "max" | "value">;
|
|
4
4
|
export interface DateInputProps extends BaseInputExposedProps {
|
|
5
5
|
/**
|
|
6
6
|
* A min value with type Date added
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DateRange, Matcher } from "react-day-picker";
|
|
3
3
|
import { CommonProps } from "../../common/CommonProps";
|
|
4
|
-
export
|
|
4
|
+
export type IDateRange = DateRange;
|
|
5
5
|
export interface DayRangePickerProps extends CommonProps {
|
|
6
6
|
/**
|
|
7
7
|
* A callback function for when a range is selected
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CommonProps } from "../../common";
|
|
3
|
-
export
|
|
3
|
+
export type Position = "left" | "right" | "top" | "bottom";
|
|
4
4
|
export interface DrawerProps extends CommonProps {
|
|
5
5
|
/**
|
|
6
6
|
* Specifies whether the drawer is open or not.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
-
export
|
|
3
|
+
export type HeadingVariant = "primary" | "secondary" | "tertiary" | "subtitle";
|
|
4
4
|
export interface HeadingProps extends CommonProps {
|
|
5
5
|
/**
|
|
6
6
|
* Child Nodes.
|
|
@@ -3,10 +3,10 @@ import { CommonProps } from "../../../common/CommonProps";
|
|
|
3
3
|
import { IconButtonProps } from "../../buttons";
|
|
4
4
|
import { IconProps } from "../../Icon/Icon";
|
|
5
5
|
import { PopoverPlacement } from "../../Popover";
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export type DotsDirection = "horizontal" | "vertical";
|
|
7
|
+
export type MenuPlacement = "above" | "below";
|
|
8
|
+
type FilteredIconProps = Omit<IconProps, "name">;
|
|
9
|
+
type FilteredIconButtonProps = Omit<IconButtonProps, "icon" | "onClick">;
|
|
10
10
|
export interface MoreMenuProps extends CommonProps {
|
|
11
11
|
children: JSX.Element;
|
|
12
12
|
dotsDirection?: DotsDirection;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
-
|
|
3
|
+
type ModalWidth = "slim" | "narrow" | "normal" | "wide" | "full";
|
|
4
4
|
export interface ModalProps extends CommonProps {
|
|
5
5
|
/**
|
|
6
6
|
* Whether modal is open or not.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FormGroupProps } from "../FormGroup/FormGroup";
|
|
3
3
|
import { NumberInputProps } from "../NumberInput/NumberInput";
|
|
4
|
-
|
|
4
|
+
type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
|
|
5
5
|
export interface NumberFieldProps extends NumberInputProps, FormGroupExposedProps {
|
|
6
6
|
/**
|
|
7
7
|
* If a value is set, the field is rendered in its invalid state.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseInputProps } from "../BaseInput";
|
|
3
|
-
|
|
3
|
+
type BaseInputExposedProps = Omit<BaseInputProps, "type">;
|
|
4
4
|
export interface NumberInputProps extends BaseInputExposedProps {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
-
|
|
3
|
+
type Size = "compact" | "full";
|
|
4
4
|
export interface ChartData<T extends object = object> {
|
|
5
5
|
/**
|
|
6
6
|
* Unique ID for this entry. Not visibile for the user
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Placement } from "@floating-ui/react";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
import { CommonProps } from "../../common";
|
|
4
|
-
|
|
4
|
+
type Render = (data: {
|
|
5
5
|
close: () => void;
|
|
6
6
|
}) => ReactElement;
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export type PopoverPlacement = Placement;
|
|
8
|
+
export type PopoverActivation = {
|
|
9
9
|
click?: boolean;
|
|
10
10
|
hover?: boolean;
|
|
11
11
|
};
|
|
@@ -27,7 +27,7 @@ interface CreateableSelectProps<Option, IsAsync extends boolean = false, IsMulti
|
|
|
27
27
|
*/
|
|
28
28
|
size?: SelectSize;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
30
|
+
export type SelectSize = "small" | "default";
|
|
31
31
|
/**
|
|
32
32
|
* The CreatableSelect component.
|
|
33
33
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TagProps } from "../Tag";
|
|
3
|
-
|
|
3
|
+
type TagsPropsNoRef = Omit<TagProps, "ref">;
|
|
4
4
|
interface TagWithWidthProps extends TagsPropsNoRef {
|
|
5
5
|
onWidthKnown?: ({ width }: {
|
|
6
6
|
width: number;
|
|
@@ -8,7 +8,7 @@ export interface SidebarItemProps extends CommonProps {
|
|
|
8
8
|
*/
|
|
9
9
|
id: string;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type Breakpoints = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
12
12
|
export interface SidebarProps extends CommonProps {
|
|
13
13
|
/**
|
|
14
14
|
* The breakpoint at which the menu will go from Horizontal to vertical stacked
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThemeColors } from "@trackunit/ui-design-tokens";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { CommonProps } from "../../common/CommonProps";
|
|
4
|
-
export
|
|
4
|
+
export type TagSize = "small" | "medium";
|
|
5
5
|
export interface TagProps extends CommonProps {
|
|
6
6
|
/**
|
|
7
7
|
* The color of the tag.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CommonProps, Size } from "../../common/CommonProps";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export type TextType = "p" | "span" | "div";
|
|
4
|
+
export type TextAlign = "left" | "center" | "right";
|
|
5
|
+
export type TextWeight = "normal" | "thick" | "bold";
|
|
6
6
|
export interface TextProps extends CommonProps {
|
|
7
7
|
/**
|
|
8
8
|
* Child nodes.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CommonProps } from "../../common";
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type TextAreaResize = "none" | "vertical" | "horizontal" | "both";
|
|
4
|
+
type FilteredInputProps = Omit<React.InputHTMLAttributes<HTMLTextAreaElement>, "prefix" | "suffix">;
|
|
5
5
|
export interface TextAreaProps extends FilteredInputProps, CommonProps {
|
|
6
6
|
/**
|
|
7
7
|
* Number of rows in the text area.
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { CommonProps } from "../../common";
|
|
3
3
|
import { FormGroupProps } from "../FormGroup/FormGroup";
|
|
4
4
|
import { TextAreaProps } from "../TextArea/TextArea";
|
|
5
|
-
|
|
5
|
+
type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
|
|
6
6
|
export interface TextAreaFieldProps extends TextAreaProps, FormGroupExposedProps, CommonProps {
|
|
7
7
|
/**
|
|
8
8
|
* Set the Maximal length of the value for the input.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { FormGroupProps } from "../FormGroup/FormGroup";
|
|
3
3
|
import { TextInputProps } from "../TextInput/TextInput";
|
|
4
|
-
|
|
4
|
+
type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
|
|
5
5
|
export interface TextFieldProps extends TextInputProps, FormGroupExposedProps {
|
|
6
6
|
/**
|
|
7
7
|
* Set the Maximal length of the value for the input.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseInputProps } from "../BaseInput/BaseInput";
|
|
3
|
-
|
|
3
|
+
type BaseInputExposedProps = Omit<BaseInputProps, "type">;
|
|
4
4
|
export interface TextInputProps extends BaseInputExposedProps {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
3
|
import "./Toggle.css";
|
|
4
|
-
export
|
|
4
|
+
export type ToggleSize = "small" | "medium";
|
|
5
5
|
export interface ToggleProps extends CommonProps {
|
|
6
6
|
/**
|
|
7
7
|
* ID of the toggle.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GeneralColors, IntentColors } from "@trackunit/ui-design-tokens";
|
|
3
3
|
import { CommonProps, Size } from "../../../common/CommonProps";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type ButtonVariant = "filled" | "transparent";
|
|
5
|
+
export type ButtonColor = Extract<GeneralColors, "primary" | "secondary"> | Extract<IntentColors, "info" | "warning" | "danger"> | "tertiary";
|
|
6
|
+
export type ButtonType = "button" | "submit";
|
|
7
7
|
export interface ButtonCommonProps extends CommonProps {
|
|
8
8
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
9
9
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CommonProps } from "../../common/CommonProps";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
type ColumnWidth = "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
+
type Space = "inherit" | "auto" | "none" | "tiny" | "mini" | "small" | "medium" | "large" | "giant" | "enormous";
|
|
5
|
+
type Occupation = "auto-fill" | "auto-fit";
|
|
6
6
|
interface IntrinsicallyResponsiveGridProps extends CommonProps {
|
|
7
7
|
/**
|
|
8
8
|
* The children to be laid out
|