@devopness/ui-react 2.162.0 → 2.164.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/dist/src/colors/getColor.d.ts +2 -0
- package/dist/src/components/Forms/Input/Input.d.ts +10 -10
- package/dist/src/components/Primitives/Dropdown/Dropdown.d.ts +3 -3
- package/dist/src/components/Primitives/ErrorMessage/ErrorMessage.d.ts +6 -2
- package/dist/src/components/Primitives/Label/Label.d.ts +3 -1
- package/dist/src/icons/iconLoader.d.ts +8 -0
- package/dist/ui-react.cjs +182 -198
- package/dist/ui-react.js +5074 -5182
- package/package.json +28 -30
|
@@ -5,7 +5,7 @@ type SharedProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
5
5
|
ref?: React.Ref<HTMLInputElement>;
|
|
6
6
|
/** Error message configuration */
|
|
7
7
|
error?: ErrorMessageProps['error'];
|
|
8
|
-
/** Props passed directly to Label component */
|
|
8
|
+
/** Props passed directly to a Label component */
|
|
9
9
|
labelProps?: LabelProps;
|
|
10
10
|
/** Custom styling options for input text */
|
|
11
11
|
publicStyle?: {
|
|
@@ -19,17 +19,17 @@ type SharedProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
19
19
|
/**
|
|
20
20
|
* Props passed directly to input HTML element
|
|
21
21
|
*
|
|
22
|
-
* @override props, e.g
|
|
22
|
+
* @override props, e.g.: inputProps.type overrides props.type
|
|
23
23
|
*
|
|
24
24
|
* <Input type="text" inputProps={{type: 'number'}} /> // input type is number
|
|
25
25
|
*/
|
|
26
26
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
27
27
|
};
|
|
28
28
|
type InputProps = (SharedProps & {
|
|
29
|
-
/** HTML input type (text, number, email, etc) */
|
|
29
|
+
/** HTML input type (text, number, email, etc.) */
|
|
30
30
|
type: Exclude<React.HTMLInputTypeAttribute, 'number'>;
|
|
31
31
|
}) | (SharedProps & {
|
|
32
|
-
/** HTML input type (text, number, email, etc) */
|
|
32
|
+
/** HTML input type (text, number, email, etc.) */
|
|
33
33
|
type: 'number';
|
|
34
34
|
/** Removes increment/decrement arrows from number inputs */
|
|
35
35
|
removeArrows?: boolean;
|
|
@@ -62,7 +62,7 @@ declare const Input: import('react').ForwardRefExoticComponent<(Omit<import('rea
|
|
|
62
62
|
ref?: React.Ref<HTMLInputElement>;
|
|
63
63
|
/** Error message configuration */
|
|
64
64
|
error?: ErrorMessageProps["error"];
|
|
65
|
-
/** Props passed directly to Label component */
|
|
65
|
+
/** Props passed directly to a Label component */
|
|
66
66
|
labelProps?: LabelProps;
|
|
67
67
|
/** Custom styling options for input text */
|
|
68
68
|
publicStyle?: {
|
|
@@ -76,20 +76,20 @@ declare const Input: import('react').ForwardRefExoticComponent<(Omit<import('rea
|
|
|
76
76
|
/**
|
|
77
77
|
* Props passed directly to input HTML element
|
|
78
78
|
*
|
|
79
|
-
* @override props, e.g
|
|
79
|
+
* @override props, e.g.: inputProps.type overrides props.type
|
|
80
80
|
*
|
|
81
81
|
* <Input type="text" inputProps={{type: 'number'}} /> // input type is number
|
|
82
82
|
*/
|
|
83
83
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
84
84
|
} & {
|
|
85
|
-
/** HTML input type (text, number, email, etc) */
|
|
85
|
+
/** HTML input type (text, number, email, etc.) */
|
|
86
86
|
type: Exclude<React.HTMLInputTypeAttribute, "number">;
|
|
87
87
|
}, "ref"> | Omit<import('react').InputHTMLAttributes<HTMLInputElement> & {
|
|
88
88
|
/** React ref for direct DOM manipulation */
|
|
89
89
|
ref?: React.Ref<HTMLInputElement>;
|
|
90
90
|
/** Error message configuration */
|
|
91
91
|
error?: ErrorMessageProps["error"];
|
|
92
|
-
/** Props passed directly to Label component */
|
|
92
|
+
/** Props passed directly to a Label component */
|
|
93
93
|
labelProps?: LabelProps;
|
|
94
94
|
/** Custom styling options for input text */
|
|
95
95
|
publicStyle?: {
|
|
@@ -103,13 +103,13 @@ declare const Input: import('react').ForwardRefExoticComponent<(Omit<import('rea
|
|
|
103
103
|
/**
|
|
104
104
|
* Props passed directly to input HTML element
|
|
105
105
|
*
|
|
106
|
-
* @override props, e.g
|
|
106
|
+
* @override props, e.g.: inputProps.type overrides props.type
|
|
107
107
|
*
|
|
108
108
|
* <Input type="text" inputProps={{type: 'number'}} /> // input type is number
|
|
109
109
|
*/
|
|
110
110
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
111
111
|
} & {
|
|
112
|
-
/** HTML input type (text, number, email, etc) */
|
|
112
|
+
/** HTML input type (text, number, email, etc.) */
|
|
113
113
|
type: "number";
|
|
114
114
|
/** Removes increment/decrement arrows from number inputs */
|
|
115
115
|
removeArrows?: boolean;
|
|
@@ -7,7 +7,7 @@ import { IconProps } from '../Icon';
|
|
|
7
7
|
import { LinkProps } from '../Link';
|
|
8
8
|
import { TooltipProps } from '../Tooltip';
|
|
9
9
|
import { Unwrap } from '../../types';
|
|
10
|
-
type DropdownOptionIcon = Unwrap<
|
|
10
|
+
type DropdownOptionIcon = Unwrap<IconProps & Pick<React.CSSProperties, 'backgroundColor'>> & {
|
|
11
11
|
icon: true;
|
|
12
12
|
};
|
|
13
13
|
type DropdownOptionLetter = Unwrap<Pick<React.CSSProperties, 'backgroundColor' | 'color'>> & {
|
|
@@ -55,7 +55,7 @@ type DropdownOption = {
|
|
|
55
55
|
/**
|
|
56
56
|
* Event handler called when this option is clicked.
|
|
57
57
|
*/
|
|
58
|
-
onClick?: () =>
|
|
58
|
+
onClick?: () => void | Promise<void>;
|
|
59
59
|
/**
|
|
60
60
|
* Tooltip's title
|
|
61
61
|
*
|
|
@@ -93,7 +93,7 @@ type DropdownSharedProps = {
|
|
|
93
93
|
*
|
|
94
94
|
* @see {DropdownOption}
|
|
95
95
|
*/
|
|
96
|
-
onSelect?: (itemClicked: DropdownOption) => void
|
|
96
|
+
onSelect?: (itemClicked: DropdownOption) => void | Promise<void>;
|
|
97
97
|
/**
|
|
98
98
|
* Event handler called when the dropdown is opened or closed.
|
|
99
99
|
*/
|
|
@@ -17,7 +17,7 @@ type ErrorMessageProps = {
|
|
|
17
17
|
*
|
|
18
18
|
* 1. { type: 'required' }
|
|
19
19
|
*
|
|
20
|
-
* 2. { message: string
|
|
20
|
+
* 2. { message: string }
|
|
21
21
|
*
|
|
22
22
|
* 3. { errors: { message: string } } [1]
|
|
23
23
|
*
|
|
@@ -29,6 +29,10 @@ type ErrorMessageProps = {
|
|
|
29
29
|
error?: ErrorWithType | ErrorWithMessage | APIError | Record<string, any> | null;
|
|
30
30
|
/** Additional CSS classes to apply to the error message container */
|
|
31
31
|
className?: string;
|
|
32
|
+
/** ID for the error message element */
|
|
33
|
+
id?: string;
|
|
34
|
+
/** Role attribute for the error message element */
|
|
35
|
+
role?: string;
|
|
32
36
|
};
|
|
33
37
|
/**
|
|
34
38
|
* Component that displays error messages in a standardized format.
|
|
@@ -38,6 +42,6 @@ type ErrorMessageProps = {
|
|
|
38
42
|
* @param props.error - Error object in various possible formats
|
|
39
43
|
* @param props.className - Additional CSS classes to apply to the container
|
|
40
44
|
*/
|
|
41
|
-
declare const ErrorMessage: ({ error, className }: ErrorMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare const ErrorMessage: ({ error, className, id, role, }: ErrorMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
46
|
export type { ErrorMessageProps };
|
|
43
47
|
export { ErrorMessage };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
type LabelProps = {
|
|
3
|
+
/** HTML element type for the label */
|
|
4
|
+
htmlFor?: string;
|
|
3
5
|
/** Main label text/node */
|
|
4
6
|
value: React.ReactNode;
|
|
5
7
|
/** Help text shown in tooltip */
|
|
@@ -26,6 +28,6 @@ type LabelProps = {
|
|
|
26
28
|
* />
|
|
27
29
|
* ```
|
|
28
30
|
*/
|
|
29
|
-
declare const Label: ({ value, helpValue, isOptional }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare const Label: ({ value, helpValue, isOptional, htmlFor, }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
32
|
export type { LabelProps };
|
|
31
33
|
export { Label };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Icon } from './types';
|
|
2
2
|
declare const iconList: readonly [{
|
|
3
|
+
readonly type: "icon";
|
|
4
|
+
readonly name: "home";
|
|
5
|
+
readonly component: import('react-icons/lib').IconType;
|
|
6
|
+
}, {
|
|
3
7
|
readonly type: "icon";
|
|
4
8
|
readonly name: "add";
|
|
5
9
|
readonly component: import('react-icons/lib').IconType;
|
|
@@ -302,6 +306,10 @@ declare const iconList: readonly [{
|
|
|
302
306
|
readonly type: "icon";
|
|
303
307
|
readonly name: "warning";
|
|
304
308
|
readonly component: import('react-icons/lib').IconType;
|
|
309
|
+
}, {
|
|
310
|
+
readonly type: "icon";
|
|
311
|
+
readonly name: "discord";
|
|
312
|
+
readonly component: import('react-icons/lib').IconType;
|
|
305
313
|
}, {
|
|
306
314
|
readonly type: "image";
|
|
307
315
|
readonly name: "aws";
|