@trackunit/react-components 0.0.52 → 0.0.53
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.
|
@@ -10,5 +10,12 @@ export interface NumberFieldProps extends NumberInputProps, FormGroupExposedProp
|
|
|
10
10
|
*/
|
|
11
11
|
errorMessage?: string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* The number field component is used for entering numeric values and includes controls for incrementally increasing or decreasing the value.
|
|
15
|
+
*
|
|
16
|
+
* _**Do use**_ the NumberField when the controls to incrementally increase or decrease makes the task easier for the user.
|
|
17
|
+
*
|
|
18
|
+
* _**Do not use**_ this fields for non-serialized numbers. Use TextField instead.
|
|
19
|
+
*/
|
|
13
20
|
export declare const NumberField: import("react").ForwardRefExoticComponent<NumberFieldProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
14
21
|
export {};
|
|
@@ -64,7 +64,11 @@ interface BaseBadgeProps extends CommonProps {
|
|
|
64
64
|
}
|
|
65
65
|
export declare type BadgeProps = BaseBadgeProps | TagProps;
|
|
66
66
|
/**
|
|
67
|
-
* The Badge component us used to display states or similar short
|
|
67
|
+
* The Badge component us used to display states or similar short informative text.
|
|
68
|
+
*
|
|
69
|
+
* _**Do use** badges to show highlighted text based on the state._
|
|
70
|
+
*
|
|
71
|
+
* _**Do not use** badges for regular text in places where it makes no sense to use highlighted text._
|
|
68
72
|
*
|
|
69
73
|
* @param {BadgeProps} props - The props for the Badge component
|
|
70
74
|
* @returns {JSX.Element} Badge component
|
|
@@ -4,31 +4,29 @@ import { Colors } from "../../constants/colors";
|
|
|
4
4
|
export interface IndicatorProps extends CommonProps {
|
|
5
5
|
/**
|
|
6
6
|
* The icon to be rendered inside the indicator component
|
|
7
|
-
*
|
|
8
|
-
* @memberof IndicatorProps
|
|
9
7
|
*/
|
|
10
8
|
icon: JSX.Element;
|
|
11
9
|
/**
|
|
12
10
|
* A color token used to style the icon and the icon background
|
|
13
|
-
*
|
|
14
|
-
* @memberof IndicatorProps
|
|
15
11
|
*/
|
|
16
12
|
color?: Colors;
|
|
17
13
|
/**
|
|
18
14
|
* A text label to be displayed next to the indicator
|
|
19
|
-
*
|
|
20
|
-
* @memberof IndicatorProps
|
|
21
15
|
*/
|
|
22
16
|
label?: string;
|
|
23
17
|
/**
|
|
24
18
|
* A boolean parameter to display or hide icon background, default value is true
|
|
25
|
-
*
|
|
26
|
-
* @memberof IndicatorProps
|
|
27
19
|
*/
|
|
28
20
|
withBackground?: boolean;
|
|
29
21
|
}
|
|
30
22
|
/**
|
|
31
|
-
*
|
|
23
|
+
* Indicators are non-interactive elements that communicate essential aspects of the state of an asset.
|
|
24
|
+
*
|
|
25
|
+
* Whenever an asset is presented, indicators provide the necessary information for a user to comprehend the state of the asset.
|
|
26
|
+
*
|
|
27
|
+
* _**Do use** indicators to communicate essential aspects of the state of an asset._
|
|
28
|
+
*
|
|
29
|
+
* _**Do not use** indicators for non-essential information, or to communicate information unrelated to the state of an asset._
|
|
32
30
|
*
|
|
33
31
|
* @param {IndicatorProps} props - The props for the Indicator component
|
|
34
32
|
* @returns {JSX.Element} Indicator component
|
|
@@ -22,7 +22,15 @@ export interface SpinnerProps extends CommonProps {
|
|
|
22
22
|
containerClassName?: string;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* The
|
|
25
|
+
* The spinner component provides visual feedback that data is being processed.
|
|
26
|
+
*
|
|
27
|
+
* Spinners are used when performing actions. They notify to the user that their request is being processed. Although they do not provide details about what is occurring on the back-end, they reassure the user that their action is being processed.
|
|
28
|
+
*
|
|
29
|
+
* Common actions that benefit from spinners include any create, update, or delete actions that may have a lot of data to process. It can be used in a table, after a primary or secondary button click, or even in a modal.
|
|
30
|
+
*
|
|
31
|
+
* Use a spinner component for any action that cannot be performed instantly and will only require a short time (between 1 to 5 seconds) to process.
|
|
32
|
+
*
|
|
33
|
+
* Use when retrieving or refreshing small data amounts, such as status.
|
|
26
34
|
*
|
|
27
35
|
* @param {SpinnerProps} props - The props for the Spinner component
|
|
28
36
|
* @returns {JSX.Element} Spinner component
|
|
@@ -17,5 +17,12 @@ export interface TextFieldProps extends TextInputProps, FormGroupExposedProps {
|
|
|
17
17
|
*/
|
|
18
18
|
errorMessage?: string;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Text fields enable the user to interact with and input content and data. This component can be used for long and short form entries. Allow the size of the text input box to reflect the length of the content you expect the user to enter.
|
|
22
|
+
*
|
|
23
|
+
* _**Do use** when the user has to input or edit simple text based information, such as metadata._
|
|
24
|
+
*
|
|
25
|
+
* _**Do not use** to confirm user actions, such as deleting. Use a checkbox for such flows._
|
|
26
|
+
*/
|
|
20
27
|
export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
21
28
|
export {};
|
package/index.js
CHANGED
|
@@ -81,7 +81,15 @@ function __rest(s, e) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
* The
|
|
84
|
+
* The spinner component provides visual feedback that data is being processed.
|
|
85
|
+
*
|
|
86
|
+
* Spinners are used when performing actions. They notify to the user that their request is being processed. Although they do not provide details about what is occurring on the back-end, they reassure the user that their action is being processed.
|
|
87
|
+
*
|
|
88
|
+
* Common actions that benefit from spinners include any create, update, or delete actions that may have a lot of data to process. It can be used in a table, after a primary or secondary button click, or even in a modal.
|
|
89
|
+
*
|
|
90
|
+
* Use a spinner component for any action that cannot be performed instantly and will only require a short time (between 1 to 5 seconds) to process.
|
|
91
|
+
*
|
|
92
|
+
* Use when retrieving or refreshing small data amounts, such as status.
|
|
85
93
|
*
|
|
86
94
|
* @param {SpinnerProps} props - The props for the Spinner component
|
|
87
95
|
* @returns {JSX.Element} Spinner component
|
|
@@ -755,7 +763,11 @@ const IconContainer = tw.div`
|
|
|
755
763
|
`;
|
|
756
764
|
|
|
757
765
|
/**
|
|
758
|
-
* The Badge component us used to display states or similar short
|
|
766
|
+
* The Badge component us used to display states or similar short informative text.
|
|
767
|
+
*
|
|
768
|
+
* _**Do use** badges to show highlighted text based on the state._
|
|
769
|
+
*
|
|
770
|
+
* _**Do not use** badges for regular text in places where it makes no sense to use highlighted text._
|
|
759
771
|
*
|
|
760
772
|
* @param {BadgeProps} props - The props for the Badge component
|
|
761
773
|
* @returns {JSX.Element} Badge component
|
|
@@ -2459,7 +2471,13 @@ const HelpAddon = tw.span`
|
|
|
2459
2471
|
`;
|
|
2460
2472
|
|
|
2461
2473
|
/**
|
|
2462
|
-
*
|
|
2474
|
+
* Indicators are non-interactive elements that communicate essential aspects of the state of an asset.
|
|
2475
|
+
*
|
|
2476
|
+
* Whenever an asset is presented, indicators provide the necessary information for a user to comprehend the state of the asset.
|
|
2477
|
+
*
|
|
2478
|
+
* _**Do use** indicators to communicate essential aspects of the state of an asset._
|
|
2479
|
+
*
|
|
2480
|
+
* _**Do not use** indicators for non-essential information, or to communicate information unrelated to the state of an asset._
|
|
2463
2481
|
*
|
|
2464
2482
|
* @param {IndicatorProps} props - The props for the Indicator component
|
|
2465
2483
|
* @returns {JSX.Element} Indicator component
|
|
@@ -2470,7 +2488,7 @@ const Indicator$1 = _a => {
|
|
|
2470
2488
|
dataTestId,
|
|
2471
2489
|
icon,
|
|
2472
2490
|
label,
|
|
2473
|
-
color,
|
|
2491
|
+
color = colors.UNKNOWN,
|
|
2474
2492
|
withBackground = true
|
|
2475
2493
|
} = _a,
|
|
2476
2494
|
rest = __rest(_a, ["dataTestId", "icon", "label", "color", "withBackground"]);
|
|
@@ -3242,6 +3260,14 @@ const NumberInput = forwardRef((props, ref) => jsx(BaseInput, Object.assign({
|
|
|
3242
3260
|
}, props)));
|
|
3243
3261
|
NumberInput.displayName = "NumberInput";
|
|
3244
3262
|
|
|
3263
|
+
/**
|
|
3264
|
+
* The number field component is used for entering numeric values and includes controls for incrementally increasing or decreasing the value.
|
|
3265
|
+
*
|
|
3266
|
+
* _**Do use**_ the NumberField when the controls to incrementally increase or decrease makes the task easier for the user.
|
|
3267
|
+
*
|
|
3268
|
+
* _**Do not use**_ this fields for non-serialized numbers. Use TextField instead.
|
|
3269
|
+
*/
|
|
3270
|
+
|
|
3245
3271
|
const NumberField = forwardRef((_a, ref) => {
|
|
3246
3272
|
var {
|
|
3247
3273
|
label,
|
|
@@ -3984,6 +4010,14 @@ const Root = tw.span`
|
|
|
3984
4010
|
font-mono
|
|
3985
4011
|
`;
|
|
3986
4012
|
|
|
4013
|
+
/**
|
|
4014
|
+
* Text fields enable the user to interact with and input content and data. This component can be used for long and short form entries. Allow the size of the text input box to reflect the length of the content you expect the user to enter.
|
|
4015
|
+
*
|
|
4016
|
+
* _**Do use** when the user has to input or edit simple text based information, such as metadata._
|
|
4017
|
+
*
|
|
4018
|
+
* _**Do not use** to confirm user actions, such as deleting. Use a checkbox for such flows._
|
|
4019
|
+
*/
|
|
4020
|
+
|
|
3987
4021
|
const TextField = React.forwardRef((_a, ref) => {
|
|
3988
4022
|
var {
|
|
3989
4023
|
label,
|