@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.
Files changed (33) hide show
  1. package/package.json +2 -2
  2. package/src/common/CommonProps.d.ts +2 -2
  3. package/src/components/ActionButton/ActionButton.d.ts +2 -2
  4. package/src/components/Alert/Alert.d.ts +2 -2
  5. package/src/components/Badge/Badge.d.ts +1 -1
  6. package/src/components/BaseInput/BaseInput.d.ts +2 -2
  7. package/src/components/Card/Card.d.ts +1 -1
  8. package/src/components/Card/CardBody.d.ts +1 -1
  9. package/src/components/DateField/DateField.d.ts +1 -1
  10. package/src/components/DateInput/DateInput.d.ts +1 -1
  11. package/src/components/DayPicker/DayRangePicker.d.ts +1 -1
  12. package/src/components/Drawer/Drawer.d.ts +1 -1
  13. package/src/components/Heading/Heading.d.ts +1 -1
  14. package/src/components/Menu/MoreMenu/MoreMenu.d.ts +4 -4
  15. package/src/components/Modal/Modal.d.ts +1 -1
  16. package/src/components/NumberField/NumberField.d.ts +1 -1
  17. package/src/components/NumberInput/NumberInput.d.ts +1 -1
  18. package/src/components/PieChart/PieChart.d.ts +1 -1
  19. package/src/components/Popover/Popover.d.ts +3 -3
  20. package/src/components/Select/CreatableSelect.d.ts +1 -1
  21. package/src/components/Select/TagWithWidth.d.ts +1 -1
  22. package/src/components/Sidebar/Sidebar.d.ts +1 -1
  23. package/src/components/Sidebar/useOverflowItems.d.ts +1 -1
  24. package/src/components/Tag/Tag.d.ts +1 -1
  25. package/src/components/Text/Text.d.ts +3 -3
  26. package/src/components/TextArea/TextArea.d.ts +2 -2
  27. package/src/components/TextAreaField/TextAreaField.d.ts +1 -1
  28. package/src/components/TextField/TextField.d.ts +1 -1
  29. package/src/components/TextInput/TextInput.d.ts +1 -1
  30. package/src/components/Toggle/Toggle.d.ts +1 -1
  31. package/src/components/buttons/shared/ButtonProps.d.ts +3 -3
  32. package/src/layout/responsive/FullWidthRepeatingLayout.d.ts +1 -1
  33. 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.17",
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.16",
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 declare type Density = "none" | "compact" | "comfortable" | "spacious" | "auto";
12
- export declare type Size = "small" | "medium" | "large";
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
- declare type ActionType = "PHONE_NUMBER" | "WEB_ADDRESS" | "EMAIL";
4
- declare type FieldSize = "small" | "medium";
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 declare type AlertActionType = "primary" | "secondary";
5
- export declare type AlertAction = {
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 declare type BadgeProps = BaseBadgeProps;
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
- declare type FilteredInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "prefix" | "suffix">;
4
- declare type FieldSize = "small" | "medium";
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
- declare type Overflow = "visible" | "hidden" | "scroll" | "auto";
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
- declare type Overflow = "visible" | "hidden" | "scroll" | "auto" | "inherit";
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
- declare type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
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
- declare type BaseInputExposedProps = Omit<BaseInputProps, "defaultValue" | "min" | "max" | "value">;
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 declare type IDateRange = DateRange;
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 declare type Position = "left" | "right" | "top" | "bottom";
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 declare type HeadingVariant = "primary" | "secondary" | "tertiary" | "subtitle";
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 declare type DotsDirection = "horizontal" | "vertical";
7
- export declare type MenuPlacement = "above" | "below";
8
- declare type FilteredIconProps = Omit<IconProps, "name">;
9
- declare type FilteredIconButtonProps = Omit<IconButtonProps, "icon" | "onClick">;
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
- declare type ModalWidth = "slim" | "narrow" | "normal" | "wide" | "full";
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
- declare type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
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
- declare type BaseInputExposedProps = Omit<BaseInputProps, "type">;
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
- declare type Size = "compact" | "full";
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
- declare type Render = (data: {
4
+ type Render = (data: {
5
5
  close: () => void;
6
6
  }) => ReactElement;
7
- export declare type PopoverPlacement = Placement;
8
- export declare type PopoverActivation = {
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 declare type SelectSize = "small" | "default";
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
- declare type TagsPropsNoRef = Omit<TagProps, "ref">;
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 declare type Breakpoints = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
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
@@ -23,7 +23,7 @@ export interface OverflowItemsOptions {
23
23
  */
24
24
  childUniqueIdentifierAttribute?: keyof HTMLAttributes<HTMLElement> | `data-${string}`;
25
25
  }
26
- export declare type OverflowMap = {
26
+ export type OverflowMap = {
27
27
  [key: string]: boolean;
28
28
  };
29
29
  /**
@@ -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 declare type TagSize = "small" | "medium";
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 declare type TextType = "p" | "span" | "div";
4
- export declare type TextAlign = "left" | "center" | "right";
5
- export declare type TextWeight = "normal" | "thick" | "bold";
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 declare type TextAreaResize = "none" | "vertical" | "horizontal" | "both";
4
- declare type FilteredInputProps = Omit<React.InputHTMLAttributes<HTMLTextAreaElement>, "prefix" | "suffix">;
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
- declare type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
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
- declare type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
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
- declare type BaseInputExposedProps = Omit<BaseInputProps, "type">;
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 declare type ToggleSize = "small" | "medium";
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 declare type ButtonVariant = "filled" | "transparent";
5
- export declare type ButtonColor = Extract<GeneralColors, "primary" | "secondary"> | Extract<IntentColors, "info" | "warning" | "danger"> | "tertiary";
6
- export declare type ButtonType = "button" | "submit";
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,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare type RowSizing = "Equal" | "MinContent" | "Unmanaged";
2
+ type RowSizing = "Equal" | "MinContent" | "Unmanaged";
3
3
  interface FullWidthRepeatingLayoutProps {
4
4
  children: React.ReactNode;
5
5
  rowSizing?: RowSizing;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { CommonProps } from "../../common/CommonProps";
3
- declare type ColumnWidth = "xs" | "sm" | "md" | "lg" | "xl";
4
- declare type Space = "inherit" | "auto" | "none" | "tiny" | "mini" | "small" | "medium" | "large" | "giant" | "enormous";
5
- declare type Occupation = "auto-fill" | "auto-fit";
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