@trackunit/react-form-components 2.10.17 → 2.11.0
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 +8 -8
- package/src/components/BaseInput/BaseInput.d.ts +2 -2
- package/src/components/Checkbox/Checkbox.d.ts +2 -2
- package/src/components/ColorField/ColorField.d.ts +2 -1
- package/src/components/DropZone/DropZone.d.ts +2 -2
- package/src/components/OptionCard/OptionCard.d.ts +2 -2
- package/src/components/PhoneField/PhoneBaseInput/PhoneBaseInput.d.ts +2 -1
- package/src/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/src/components/RadioGroup/RadioItem.d.ts +2 -2
- package/src/components/TextAreaField/TextArea/TextAreaBaseInput.d.ts +2 -2
- package/src/components/ToggleSwitch/ToggleSwitch.d.ts +2 -2
- package/src/components/ToggleSwitchOption/ToggleSwitchOption.d.ts +2 -2
- package/src/components/UploadInput/UploadInput.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-form-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"migrations": "./migrations.json",
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"react-calendar": "^6.0.1",
|
|
12
12
|
"react-select": "^5.10.2",
|
|
13
|
-
"@trackunit/date-and-time-utils": "1.
|
|
13
|
+
"@trackunit/date-and-time-utils": "1.18.0",
|
|
14
14
|
"usehooks-ts": "^3.1.0",
|
|
15
15
|
"libphonenumber-js": "^1.13.11",
|
|
16
16
|
"zod": "^3.25.76",
|
|
17
17
|
"tailwind-merge": "^2.0.0",
|
|
18
|
-
"@trackunit/css-class-variance-utilities": "2.
|
|
19
|
-
"@trackunit/react-components": "3.
|
|
20
|
-
"@trackunit/ui-icons": "1.
|
|
21
|
-
"@trackunit/shared-utils": "1.
|
|
22
|
-
"@trackunit/ui-design-tokens": "1.
|
|
23
|
-
"@trackunit/i18n-library-translation": "2.
|
|
18
|
+
"@trackunit/css-class-variance-utilities": "2.4.0",
|
|
19
|
+
"@trackunit/react-components": "3.9.0",
|
|
20
|
+
"@trackunit/ui-icons": "1.18.0",
|
|
21
|
+
"@trackunit/shared-utils": "1.20.0",
|
|
22
|
+
"@trackunit/ui-design-tokens": "1.19.0",
|
|
23
|
+
"@trackunit/i18n-library-translation": "2.9.0",
|
|
24
24
|
"string-ts": "^2.0.0",
|
|
25
25
|
"es-toolkit": "^1.52.0"
|
|
26
26
|
},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CommonProps, Refable } from "@trackunit/react-components";
|
|
1
|
+
import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
|
|
2
2
|
import { MappedOmit } from "@trackunit/shared-utils";
|
|
3
3
|
import { InputHTMLAttributes, ReactElement, ReactNode } from "react";
|
|
4
4
|
import { FormComponentSizes } from "../../types";
|
|
5
5
|
import { LockedForReasons } from "./InputLockReasonTooltip";
|
|
6
6
|
import { BaseInputActionTypes } from "./components/GenericActionsRenderer";
|
|
7
7
|
type FilteredInputProps = MappedOmit<InputHTMLAttributes<HTMLInputElement>, "prefix" | "disabled" | "readOnly">;
|
|
8
|
-
export interface BaseInputProps extends FilteredInputProps, CommonProps, Refable<HTMLInputElement> {
|
|
8
|
+
export interface BaseInputProps extends FilteredInputProps, CommonProps, Styleable, Refable<HTMLInputElement> {
|
|
9
9
|
/**
|
|
10
10
|
* A React element to render before the text in the input.
|
|
11
11
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CommonProps, Refable } from "@trackunit/react-components";
|
|
1
|
+
import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
|
|
2
2
|
import { MappedOmit } from "@trackunit/shared-utils";
|
|
3
3
|
import { InputHTMLAttributes, ReactNode } from "react";
|
|
4
|
-
export interface CheckboxProps extends CommonProps, MappedOmit<InputHTMLAttributes<HTMLInputElement>, "prefix">, Refable<HTMLInputElement> {
|
|
4
|
+
export interface CheckboxProps extends CommonProps, MappedOmit<InputHTMLAttributes<HTMLInputElement>, "prefix">, Styleable, Refable<HTMLInputElement> {
|
|
5
5
|
/**
|
|
6
6
|
* A string element to be displayed as a label
|
|
7
7
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Styleable } from "@trackunit/react-components";
|
|
1
2
|
import { MappedOmit } from "@trackunit/shared-utils";
|
|
2
3
|
import { BaseInputProps } from "../BaseInput/BaseInput";
|
|
3
4
|
import { FormGroupProps } from "../FormGroup/FormGroup";
|
|
@@ -10,7 +11,7 @@ type ColorFieldBaseInputProps = MappedOmit<BaseInputProps, "prefix" | "suffix" |
|
|
|
10
11
|
* @returns {boolean} True if the value is a valid hex color, otherwise false.
|
|
11
12
|
*/
|
|
12
13
|
export declare const isValidHEXColor: (value: string) => boolean;
|
|
13
|
-
export interface ColorFieldProps extends FormGroupExposedProps, ColorFieldBaseInputProps {
|
|
14
|
+
export interface ColorFieldProps extends FormGroupExposedProps, ColorFieldBaseInputProps, Styleable {
|
|
14
15
|
/**
|
|
15
16
|
* If a value is set, the field is rendered in its invalid state.
|
|
16
17
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CommonProps, Refable, Size } from "@trackunit/react-components";
|
|
1
|
+
import { CommonProps, Refable, Size, type Styleable } from "@trackunit/react-components";
|
|
2
2
|
import { ReactElement, ReactNode } from "react";
|
|
3
3
|
import { BaseInputProps } from "../BaseInput/BaseInput";
|
|
4
4
|
type BaseInputExposedProps = Omit<BaseInputProps, "type" | "suffix" | "prefix" | "addonAfter" | "addonBefore" | "actions" | "placeholder" | "fieldSize" | "size">;
|
|
5
|
-
export interface DropZoneProps extends Omit<BaseInputExposedProps, "ref">, CommonProps, Refable<HTMLDivElement> {
|
|
5
|
+
export interface DropZoneProps extends Omit<BaseInputExposedProps, "ref">, CommonProps, Styleable, Refable<HTMLDivElement> {
|
|
6
6
|
/**
|
|
7
7
|
* A JSX element or a string to set a focusable label in Drop Zone. If not provided, the default label will be used.
|
|
8
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CommonProps, IconProps, Refable, TagProps } from "@trackunit/react-components";
|
|
1
|
+
import { CommonProps, IconProps, Refable, type Styleable, TagProps } from "@trackunit/react-components";
|
|
2
2
|
import { InputHTMLAttributes, ReactElement, ReactNode } from "react";
|
|
3
|
-
export interface OptionCardProps extends InputHTMLAttributes<HTMLInputElement>, CommonProps, Refable<HTMLInputElement> {
|
|
3
|
+
export interface OptionCardProps extends InputHTMLAttributes<HTMLInputElement>, CommonProps, Styleable, Refable<HTMLInputElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Icon displayed at the top inside the OptionCard.
|
|
6
6
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
|
|
1
2
|
import { ReactElement, ReactNode } from "react";
|
|
2
3
|
import { BaseInputProps } from "../../BaseInput/BaseInput";
|
|
3
4
|
type BaseInputExposedProps = Omit<BaseInputProps, "actions">;
|
|
4
|
-
export interface PhoneBaseInputProps extends BaseInputExposedProps {
|
|
5
|
+
export interface PhoneBaseInputProps extends BaseInputExposedProps, CommonProps, Styleable, Refable<HTMLInputElement> {
|
|
5
6
|
/**
|
|
6
7
|
* To disable the action button.
|
|
7
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CommonProps, Refable } from "@trackunit/react-components";
|
|
1
|
+
import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
|
|
2
2
|
import { ChangeEvent, InputHTMLAttributes, ReactElement, ReactNode } from "react";
|
|
3
|
-
export interface RadioGroupProps<TValue extends string | number> extends CommonProps, Refable<HTMLDivElement>, InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
export interface RadioGroupProps<TValue extends string | number> extends CommonProps, Styleable, Refable<HTMLDivElement>, InputHTMLAttributes<HTMLInputElement> {
|
|
4
4
|
/**
|
|
5
5
|
*/
|
|
6
6
|
children: ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CommonProps, Refable } from "@trackunit/react-components";
|
|
1
|
+
import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
|
|
2
2
|
import { MappedOmit } from "@trackunit/shared-utils";
|
|
3
3
|
import { InputHTMLAttributes, ReactElement, ReactNode } from "react";
|
|
4
|
-
export interface RadioItemProps<TValue extends string | number = string> extends CommonProps, Refable<HTMLLabelElement>, MappedOmit<InputHTMLAttributes<HTMLInputElement>, "prefix"> {
|
|
4
|
+
export interface RadioItemProps<TValue extends string | number = string> extends CommonProps, Styleable, Refable<HTMLLabelElement>, MappedOmit<InputHTMLAttributes<HTMLInputElement>, "prefix"> {
|
|
5
5
|
/**
|
|
6
6
|
* The label of the radio item.
|
|
7
7
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CommonProps, Refable } from "@trackunit/react-components";
|
|
1
|
+
import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
|
|
2
2
|
import { InputHTMLAttributes } from "react";
|
|
3
3
|
export type TextAreaResize = "none" | "vertical" | "horizontal" | "both";
|
|
4
4
|
type FilteredInputProps = Omit<InputHTMLAttributes<HTMLTextAreaElement>, "prefix" | "suffix">;
|
|
5
|
-
export interface TextAreaBaseInputProps extends FilteredInputProps, CommonProps, Refable<HTMLTextAreaElement> {
|
|
5
|
+
export interface TextAreaBaseInputProps extends FilteredInputProps, CommonProps, Styleable, Refable<HTMLTextAreaElement> {
|
|
6
6
|
/**
|
|
7
7
|
* Number of rows in the text area.
|
|
8
8
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CommonProps, Refable } from "@trackunit/react-components";
|
|
1
|
+
import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
|
|
2
2
|
import { MappedOmit, Size } from "@trackunit/shared-utils";
|
|
3
3
|
import { ChangeEvent, InputHTMLAttributes, MouseEventHandler, ReactElement } from "react";
|
|
4
|
-
export interface ToggleSwitchProps extends CommonProps, MappedOmit<InputHTMLAttributes<HTMLInputElement>, "prefix" | "onChange" | "size" | "children">, Refable<HTMLInputElement> {
|
|
4
|
+
export interface ToggleSwitchProps extends CommonProps, MappedOmit<InputHTMLAttributes<HTMLInputElement>, "prefix" | "onChange" | "size" | "children">, Styleable, Refable<HTMLInputElement> {
|
|
5
5
|
/**
|
|
6
6
|
* custom onChange event handler.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Refable } from "@trackunit/react-components";
|
|
1
|
+
import { Refable, type Styleable } from "@trackunit/react-components";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
import { ToggleSwitchProps } from "../ToggleSwitch/ToggleSwitch";
|
|
4
|
-
export interface ToggleSwitchOptionProps extends Omit<ToggleSwitchProps, "ref">, Refable<HTMLLabelElement> {
|
|
4
|
+
export interface ToggleSwitchOptionProps extends Omit<ToggleSwitchProps, "ref">, Styleable, Refable<HTMLLabelElement> {
|
|
5
5
|
/**
|
|
6
6
|
* The label of the toggle.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CommonProps } from "@trackunit/react-components";
|
|
1
|
+
import { CommonProps, Refable, type Styleable } from "@trackunit/react-components";
|
|
2
2
|
import { BaseInputProps } from "../BaseInput/BaseInput";
|
|
3
3
|
type BaseInputExposedProps = Omit<BaseInputProps, "type" | "suffix" | "prefix" | "addonAfter" | "addonBefore" | "actions" | "placeholder">;
|
|
4
|
-
export interface UploadInputProps extends BaseInputExposedProps, CommonProps {
|
|
4
|
+
export interface UploadInputProps extends BaseInputExposedProps, CommonProps, Styleable, Refable<HTMLInputElement> {
|
|
5
5
|
/**
|
|
6
6
|
* A flag to disable the upload input.
|
|
7
7
|
*/
|