@mage-ui/components 0.0.28 → 0.0.29
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/components/buttons/button/Button.d.ts +2 -2
- package/dist/components/buttons/button-icon/ButtonIcon.d.ts +2 -2
- package/dist/components/buttons/button-icon/ButtonIcon.d.ts.map +1 -1
- package/dist/components/controls/dropdown/Combobox.d.ts +2 -2
- package/dist/components/controls/dropdown/DropdownButton.d.ts +4 -4
- package/dist/components/controls/dropdown/Select.d.ts +2 -2
- package/dist/components/controls/input-file/InputFile.d.ts +2 -2
- package/dist/components/controls/input-password/InputPassword.d.ts +2 -2
- package/dist/components/controls/input-text/InputText.d.ts +2 -2
- package/dist/components/controls/textarea/Textarea.d.ts +2 -2
- package/dist/components/data-display/avatar/Avatar.d.ts +2 -2
- package/dist/components/data-display/badge/Badge.d.ts +2 -2
- package/dist/components/data-display/carousel/Carousel.d.ts +2 -2
- package/dist/components/data-display/tables/table/Table.d.ts +8 -8
- package/dist/components/forms/form/Form.d.ts +18 -18
- package/dist/components/forms/form/Form.d.ts.map +1 -1
- package/dist/components/forms/form/Form.js +1 -1
- package/dist/components/forms/form/Form.js.map +1 -1
- package/dist/components/misc/visually-hidden/VisuallyHidden.d.ts +2 -2
- package/dist/components/misc/visually-hidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/tabs/Tabs.d.ts +5 -5
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime36 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/buttons/button/Button.d.ts
|
|
@@ -18,7 +18,7 @@ declare const Button: ({
|
|
|
18
18
|
endSlot,
|
|
19
19
|
children,
|
|
20
20
|
...props
|
|
21
|
-
}: ButtonProps) =>
|
|
21
|
+
}: ButtonProps) => react_jsx_runtime36.JSX.Element;
|
|
22
22
|
//# sourceMappingURL=Button.d.ts.map
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from "../button/Button.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/buttons/button-icon/ButtonIcon.d.ts
|
|
5
5
|
type ButtonIconProps = ButtonProps & {
|
|
@@ -15,7 +15,7 @@ declare const ButtonIcon: ({
|
|
|
15
15
|
icon,
|
|
16
16
|
classNames,
|
|
17
17
|
...props
|
|
18
|
-
}: ButtonIconProps) =>
|
|
18
|
+
}: ButtonIconProps) => react_jsx_runtime8.JSX.Element;
|
|
19
19
|
//# sourceMappingURL=ButtonIcon.d.ts.map
|
|
20
20
|
|
|
21
21
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.d.ts","names":[],"sources":["../../../../src/components/buttons/button-icon/ButtonIcon.tsx"],"sourcesContent":[],"mappings":";;;;KAMY,eAAA,GAAkB;;;EAAlB,UAAA,CAAA,EAAA;IASC,IAAA,CAAA,EAAA,MAkBZ;IAAA,IAAA,CAAA,EAAA,MAAA;EAAA,CAAA;CAlB0B;AAAA,cAAd,UAAc,EAAA,CAAA;EAAA,KAAA;EAAA,IAAA;EAAA,UAAA;EAAA,GAAA;AAAA,CAAA,EAKxB,eALwB,EAAA,GAKT,
|
|
1
|
+
{"version":3,"file":"ButtonIcon.d.ts","names":[],"sources":["../../../../src/components/buttons/button-icon/ButtonIcon.tsx"],"sourcesContent":[],"mappings":";;;;KAMY,eAAA,GAAkB;;;EAAlB,UAAA,CAAA,EAAA;IASC,IAAA,CAAA,EAAA,MAkBZ;IAAA,IAAA,CAAA,EAAA,MAAA;EAAA,CAAA;CAlB0B;AAAA,cAAd,UAAc,EAAA,CAAA;EAAA,KAAA;EAAA,IAAA;EAAA,UAAA;EAAA,GAAA;AAAA,CAAA,EAKxB,eALwB,EAAA,GAKT,kBAAA,CAAA,GAAA,CAAA,OALS"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DropdownBaseProps } from "./DropdownBase.js";
|
|
2
2
|
import { InputTextProps } from "../input-text/InputText.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime41 from "react/jsx-runtime";
|
|
4
4
|
import React from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/components/controls/dropdown/Combobox.d.ts
|
|
@@ -34,7 +34,7 @@ declare const Combobox: ({
|
|
|
34
34
|
create,
|
|
35
35
|
empty,
|
|
36
36
|
...props
|
|
37
|
-
}: ComboboxProps) =>
|
|
37
|
+
}: ComboboxProps) => react_jsx_runtime41.JSX.Element;
|
|
38
38
|
//# sourceMappingURL=Combobox.d.ts.map
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime42 from "react/jsx-runtime";
|
|
2
|
+
import * as react43 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/controls/dropdown/DropdownButton.d.ts
|
|
5
5
|
type DropdownButtonProps = {
|
|
@@ -18,11 +18,11 @@ declare const DropdownButton: {
|
|
|
18
18
|
children,
|
|
19
19
|
endSlot,
|
|
20
20
|
...props
|
|
21
|
-
}: DropdownButtonProps):
|
|
21
|
+
}: DropdownButtonProps): react_jsx_runtime42.JSX.Element;
|
|
22
22
|
Option: {
|
|
23
23
|
({
|
|
24
24
|
children
|
|
25
|
-
}: DropdownButtonOptionProps):
|
|
25
|
+
}: DropdownButtonOptionProps): react43.ReactNode;
|
|
26
26
|
displayName: string;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DropdownBaseProps } from "./DropdownBase.js";
|
|
2
2
|
import { InputTextProps } from "../input-text/InputText.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime44 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/controls/dropdown/Select.d.ts
|
|
6
6
|
type SelectProps = Omit<DropdownBaseProps, 'children' | 'onClick' | 'setQuery' | 'target'> & InputTextProps & {
|
|
@@ -23,7 +23,7 @@ declare const Select: ({
|
|
|
23
23
|
options,
|
|
24
24
|
classNames,
|
|
25
25
|
...props
|
|
26
|
-
}: SelectProps) =>
|
|
26
|
+
}: SelectProps) => react_jsx_runtime44.JSX.Element;
|
|
27
27
|
//# sourceMappingURL=Select.d.ts.map
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime45 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/controls/input-file/InputFile.d.ts
|
|
4
4
|
type InputFileProps = {
|
|
@@ -26,7 +26,7 @@ declare const InputFile: ({
|
|
|
26
26
|
multiple,
|
|
27
27
|
badgeClassName,
|
|
28
28
|
...props
|
|
29
|
-
}: InputFileProps) =>
|
|
29
|
+
}: InputFileProps) => react_jsx_runtime45.JSX.Element;
|
|
30
30
|
//# sourceMappingURL=InputFile.d.ts.map
|
|
31
31
|
//#endregion
|
|
32
32
|
export { InputFile, InputFileProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime46 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/controls/input-password/InputPassword.d.ts
|
|
@@ -26,7 +26,7 @@ declare const InputPassword: ({
|
|
|
26
26
|
startSlot,
|
|
27
27
|
endSlot,
|
|
28
28
|
...props
|
|
29
|
-
}: InputPasswordProps) =>
|
|
29
|
+
}: InputPasswordProps) => react_jsx_runtime46.JSX.Element;
|
|
30
30
|
//# sourceMappingURL=InputPassword.d.ts.map
|
|
31
31
|
//#endregion
|
|
32
32
|
export { InputPassword, InputPasswordProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime47 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/controls/input-text/InputText.d.ts
|
|
@@ -25,7 +25,7 @@ declare const InputText: ({
|
|
|
25
25
|
startSlot,
|
|
26
26
|
endSlot,
|
|
27
27
|
...props
|
|
28
|
-
}: InputTextProps) =>
|
|
28
|
+
}: InputTextProps) => react_jsx_runtime47.JSX.Element;
|
|
29
29
|
//# sourceMappingURL=InputText.d.ts.map
|
|
30
30
|
//#endregion
|
|
31
31
|
export { InputText, InputTextProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime40 from "react/jsx-runtime";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/controls/textarea/Textarea.d.ts
|
|
@@ -27,7 +27,7 @@ declare const Textarea: ({
|
|
|
27
27
|
autosize,
|
|
28
28
|
onChange,
|
|
29
29
|
...props
|
|
30
|
-
}: TextareaProps) =>
|
|
30
|
+
}: TextareaProps) => react_jsx_runtime40.JSX.Element;
|
|
31
31
|
//# sourceMappingURL=Textarea.d.ts.map
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime37 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/data-display/avatar/Avatar.d.ts
|
|
4
4
|
type AvatarProps = {
|
|
@@ -13,7 +13,7 @@ type AvatarProps = {
|
|
|
13
13
|
declare const Avatar: ({
|
|
14
14
|
classNames,
|
|
15
15
|
...props
|
|
16
|
-
}: AvatarProps) =>
|
|
16
|
+
}: AvatarProps) => react_jsx_runtime37.JSX.Element;
|
|
17
17
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime38 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/data-display/badge/Badge.d.ts
|
|
@@ -17,7 +17,7 @@ declare const Badge: ({
|
|
|
17
17
|
startSlot,
|
|
18
18
|
classNames,
|
|
19
19
|
...props
|
|
20
|
-
}: BadgeProps) =>
|
|
20
|
+
}: BadgeProps) => react_jsx_runtime38.JSX.Element;
|
|
21
21
|
//# sourceMappingURL=Badge.d.ts.map
|
|
22
22
|
|
|
23
23
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime39 from "react/jsx-runtime";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/data-display/carousel/Carousel.d.ts
|
|
@@ -40,7 +40,7 @@ declare const Carousel: {
|
|
|
40
40
|
({
|
|
41
41
|
classNames,
|
|
42
42
|
...props
|
|
43
|
-
}: CarouselProps):
|
|
43
|
+
}: CarouselProps): react_jsx_runtime39.JSX.Element;
|
|
44
44
|
Slide: {
|
|
45
45
|
({
|
|
46
46
|
children
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime73 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/data-display/tables/table/Table.d.ts
|
|
4
4
|
type TableProps = {
|
|
@@ -17,14 +17,14 @@ declare const Table: {
|
|
|
17
17
|
classNames,
|
|
18
18
|
scrollable,
|
|
19
19
|
children
|
|
20
|
-
}: TableProps):
|
|
20
|
+
}: TableProps): react_jsx_runtime73.JSX.Element;
|
|
21
21
|
displayName: string;
|
|
22
22
|
Header: {
|
|
23
23
|
({
|
|
24
24
|
children
|
|
25
25
|
}: {
|
|
26
26
|
children: any;
|
|
27
|
-
}):
|
|
27
|
+
}): react_jsx_runtime73.JSX.Element;
|
|
28
28
|
displayName: string;
|
|
29
29
|
};
|
|
30
30
|
Body: {
|
|
@@ -32,7 +32,7 @@ declare const Table: {
|
|
|
32
32
|
children
|
|
33
33
|
}: {
|
|
34
34
|
children: any;
|
|
35
|
-
}):
|
|
35
|
+
}): react_jsx_runtime73.JSX.Element;
|
|
36
36
|
displayName: string;
|
|
37
37
|
};
|
|
38
38
|
Footer: {
|
|
@@ -40,7 +40,7 @@ declare const Table: {
|
|
|
40
40
|
children
|
|
41
41
|
}: {
|
|
42
42
|
children: any;
|
|
43
|
-
}):
|
|
43
|
+
}): react_jsx_runtime73.JSX.Element;
|
|
44
44
|
displayName: string;
|
|
45
45
|
};
|
|
46
46
|
Head: {
|
|
@@ -50,7 +50,7 @@ declare const Table: {
|
|
|
50
50
|
}: {
|
|
51
51
|
[x: string]: any;
|
|
52
52
|
children: any;
|
|
53
|
-
}):
|
|
53
|
+
}): react_jsx_runtime73.JSX.Element;
|
|
54
54
|
displayName: string;
|
|
55
55
|
};
|
|
56
56
|
Row: {
|
|
@@ -60,7 +60,7 @@ declare const Table: {
|
|
|
60
60
|
}: {
|
|
61
61
|
[x: string]: any;
|
|
62
62
|
children: any;
|
|
63
|
-
}):
|
|
63
|
+
}): react_jsx_runtime73.JSX.Element;
|
|
64
64
|
displayName: string;
|
|
65
65
|
};
|
|
66
66
|
Cell: {
|
|
@@ -70,7 +70,7 @@ declare const Table: {
|
|
|
70
70
|
}: {
|
|
71
71
|
[x: string]: any;
|
|
72
72
|
children: any;
|
|
73
|
-
}):
|
|
73
|
+
}): react_jsx_runtime73.JSX.Element;
|
|
74
74
|
displayName: string;
|
|
75
75
|
};
|
|
76
76
|
};
|
|
@@ -11,14 +11,14 @@ import { FormDatePickerProps } from "./controls/FormDatePicker.js";
|
|
|
11
11
|
import { FormInputFileProps } from "./controls/FormInputFile.js";
|
|
12
12
|
import { FormInputPasswordProps } from "./controls/FormInputPassword.js";
|
|
13
13
|
import { FormIfFieldProps } from "./controls/FormIfField.js";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
15
15
|
import { ReactNode } from "react";
|
|
16
|
-
import {
|
|
16
|
+
import { ZodObject, ZodRawShape, z } from "zod";
|
|
17
17
|
|
|
18
18
|
//#region src/components/forms/form/Form.d.ts
|
|
19
19
|
type FormProps = {
|
|
20
20
|
defaultValues?: object;
|
|
21
|
-
rules?:
|
|
21
|
+
rules?: ZodObject<ZodRawShape>;
|
|
22
22
|
onSubmit: (formData: object) => void;
|
|
23
23
|
children: React.ReactNode;
|
|
24
24
|
};
|
|
@@ -29,11 +29,11 @@ declare const Form: {
|
|
|
29
29
|
onSubmit,
|
|
30
30
|
children,
|
|
31
31
|
...props
|
|
32
|
-
}: FormProps):
|
|
32
|
+
}: FormProps): react_jsx_runtime9.JSX.Element;
|
|
33
33
|
InputText: {
|
|
34
34
|
({
|
|
35
35
|
...props
|
|
36
|
-
}: FormInputTextProps):
|
|
36
|
+
}: FormInputTextProps): react_jsx_runtime9.JSX.Element;
|
|
37
37
|
displayName: string;
|
|
38
38
|
rules: {
|
|
39
39
|
required: (message?: string, min?: number) => z.ZodString;
|
|
@@ -44,7 +44,7 @@ declare const Form: {
|
|
|
44
44
|
name,
|
|
45
45
|
control,
|
|
46
46
|
...props
|
|
47
|
-
}: FormCheckboxProps):
|
|
47
|
+
}: FormCheckboxProps): react_jsx_runtime9.JSX.Element;
|
|
48
48
|
displayName: string;
|
|
49
49
|
rules: {
|
|
50
50
|
required: (message?: string) => z.ZodEffects<z.ZodBoolean, boolean, boolean>;
|
|
@@ -56,7 +56,7 @@ declare const Form: {
|
|
|
56
56
|
control,
|
|
57
57
|
children,
|
|
58
58
|
...props
|
|
59
|
-
}: FormCheckboxGroupProps):
|
|
59
|
+
}: FormCheckboxGroupProps): react_jsx_runtime9.JSX.Element;
|
|
60
60
|
displayName: string;
|
|
61
61
|
rules: {
|
|
62
62
|
required: (message?: string) => z.ZodArray<z.ZodString, "many">;
|
|
@@ -74,13 +74,13 @@ declare const Form: {
|
|
|
74
74
|
name,
|
|
75
75
|
control,
|
|
76
76
|
...props
|
|
77
|
-
}: FormComboboxProps):
|
|
77
|
+
}: FormComboboxProps): react_jsx_runtime9.JSX.Element;
|
|
78
78
|
displayName: string;
|
|
79
79
|
rules: {
|
|
80
80
|
required: (message?: string, defaultValue?: {
|
|
81
81
|
id: string;
|
|
82
82
|
value: null;
|
|
83
|
-
}) => z.ZodEffects<z.ZodDefault<
|
|
83
|
+
}) => z.ZodEffects<z.ZodDefault<ZodObject<{
|
|
84
84
|
id: z.ZodString;
|
|
85
85
|
value: z.ZodNullable<z.ZodString>;
|
|
86
86
|
}, "strip", z.ZodAny, z.objectOutputType<{
|
|
@@ -104,20 +104,20 @@ declare const Form: {
|
|
|
104
104
|
control,
|
|
105
105
|
children,
|
|
106
106
|
...props
|
|
107
|
-
}: FormRadioGroupProps):
|
|
107
|
+
}: FormRadioGroupProps): react_jsx_runtime9.JSX.Element;
|
|
108
108
|
displayName: string;
|
|
109
109
|
rules: {
|
|
110
110
|
required: (message?: string) => z.ZodEffects<z.ZodAny, any, any>;
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
Radio: {
|
|
114
|
-
(props: RadioProps):
|
|
114
|
+
(props: RadioProps): react_jsx_runtime9.JSX.Element;
|
|
115
115
|
displayName: string;
|
|
116
116
|
};
|
|
117
117
|
Textarea: {
|
|
118
118
|
({
|
|
119
119
|
...props
|
|
120
|
-
}: FormTextareaProps):
|
|
120
|
+
}: FormTextareaProps): react_jsx_runtime9.JSX.Element;
|
|
121
121
|
displayName: string;
|
|
122
122
|
rules: {
|
|
123
123
|
required: (message?: string, min?: number) => z.ZodString;
|
|
@@ -128,13 +128,13 @@ declare const Form: {
|
|
|
128
128
|
name,
|
|
129
129
|
control,
|
|
130
130
|
...props
|
|
131
|
-
}: FormSelectProps):
|
|
131
|
+
}: FormSelectProps): react_jsx_runtime9.JSX.Element;
|
|
132
132
|
displayName: string;
|
|
133
133
|
rules: {
|
|
134
134
|
required: (message?: string, defaultValue?: {
|
|
135
135
|
id: string;
|
|
136
136
|
value: null;
|
|
137
|
-
}) => z.ZodEffects<z.ZodDefault<
|
|
137
|
+
}) => z.ZodEffects<z.ZodDefault<ZodObject<{
|
|
138
138
|
id: z.ZodString;
|
|
139
139
|
value: z.ZodNullable<z.ZodString>;
|
|
140
140
|
}, "strip", z.ZodAny, z.objectOutputType<{
|
|
@@ -157,10 +157,10 @@ declare const Form: {
|
|
|
157
157
|
name,
|
|
158
158
|
control,
|
|
159
159
|
...props
|
|
160
|
-
}: FormDatePickerProps):
|
|
160
|
+
}: FormDatePickerProps): react_jsx_runtime9.JSX.Element;
|
|
161
161
|
displayName: string;
|
|
162
162
|
rules: {
|
|
163
|
-
required: (message?: string) => z.ZodEffects<z.ZodUnion<[ZodType<Date, z.ZodTypeDef, Date>, z.ZodEffects<z.ZodString, string, string>]>, string | Date, string | Date>;
|
|
163
|
+
required: (message?: string) => z.ZodEffects<z.ZodUnion<[z.ZodType<Date, z.ZodTypeDef, Date>, z.ZodEffects<z.ZodString, string, string>]>, string | Date, string | Date>;
|
|
164
164
|
};
|
|
165
165
|
};
|
|
166
166
|
InputFile: {
|
|
@@ -168,7 +168,7 @@ declare const Form: {
|
|
|
168
168
|
control,
|
|
169
169
|
name,
|
|
170
170
|
...props
|
|
171
|
-
}: FormInputFileProps):
|
|
171
|
+
}: FormInputFileProps): react_jsx_runtime9.JSX.Element;
|
|
172
172
|
displayName: string;
|
|
173
173
|
rules: {
|
|
174
174
|
required: (message?: string, min?: number) => z.ZodEffects<z.ZodAny, any, any>;
|
|
@@ -177,7 +177,7 @@ declare const Form: {
|
|
|
177
177
|
InputPassword: {
|
|
178
178
|
({
|
|
179
179
|
...props
|
|
180
|
-
}: FormInputPasswordProps):
|
|
180
|
+
}: FormInputPasswordProps): react_jsx_runtime9.JSX.Element;
|
|
181
181
|
displayName: string;
|
|
182
182
|
rules: {
|
|
183
183
|
required: (message?: string) => z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","names":[],"sources":["../../../../src/components/forms/form/Form.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;KAwBY,SAAA;;UAEF;;
|
|
1
|
+
{"version":3,"file":"Form.d.ts","names":[],"sources":["../../../../src/components/forms/form/Form.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;KAwBY,SAAA;;UAEF,UAAU;;YAER,KAAA,CAAM;;cAGL;;;;;;;KAMV,YAAS,kBAAA,CAAA,GAAA,CAAA;;;;OAAA;;;;;;;IAbA,CAAA;MAAA,IAAA;MAAS,OAAA;MAAA,GAAA;IAAA,CAAA,mBAAA,CAAA,gCAAA;IAAA,WAAA,EAAA,MAAA;IAED,KAAA,EAAA;MAAV,QAAA,EAAA,CAAA,OAAA,CAAA,EAAA,MAAA,EAAA,eAAA,aAAA,EAAA,OAAA,EAAA,OAAA,CAAA;IAEE,CAAA;EAAe,CAAA;EAGd,aA0BZ,EAAA;IAAA,CAAA;MAAA,IAAA;MAAA,OAAA;MAAA,QAAA;MAAA,GAAA;IAAA,CAAA,wBAAA,CAAA,gCAAA;IAAA,WAAA,EAAA,MAAA;;;;IApBE,QAAA,EAAA;MAAS,CAAA;QAAA,UAAA;QAAA,GAAA;MAAA,CAAA,eAAA,CAAA,WAAA;MAAA,WAAA,EAAA,MAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{FormCheckbox as e}from"./controls/FormCheckbox.js";import{FormCheckboxGroup as t}from"./controls/FormCheckboxGroup.js";import{FormCombobox as n}from"./controls/FormCombobox.js";import{FormDatePicker as r}from"./controls/FormDatePicker.js";import{FormIfField as i}from"./controls/FormIfField.js";import{FormInputFile as a}from"./controls/FormInputFile.js";import{FormInputPassword as o}from"./controls/FormInputPassword.js";import{FormInputText as s}from"./controls/FormInputText.js";import{FormRadio as c}from"./controls/FormRadio.js";import{FormRadioGroup as l}from"./controls/FormRadioGroup.js";import{FormSelect as u}from"./controls/FormSelect.js";import{FormTextarea as d}from"./controls/FormTextarea.js";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{Children as m,cloneElement as h,isValidElement as g}from"react";import{FormProvider as _,useForm as v}from"react-hook-form";import{z as y}from"zod";import{zodResolver as b}from"@hookform/resolvers/zod";const x=({defaultValues:e,rules:t=y.object({}),onSubmit:n,children:r,...i})=>{let a=v({shouldFocusError:!0,resolver:b(t),defaultValues:e}),{register:o,handleSubmit:s,formState:{errors:c}}=a;return f(_,{...a,children:p(`form`,{onSubmit:s(n),...i,children:[
|
|
1
|
+
import{FormCheckbox as e}from"./controls/FormCheckbox.js";import{FormCheckboxGroup as t}from"./controls/FormCheckboxGroup.js";import{FormCombobox as n}from"./controls/FormCombobox.js";import{FormDatePicker as r}from"./controls/FormDatePicker.js";import{FormIfField as i}from"./controls/FormIfField.js";import{FormInputFile as a}from"./controls/FormInputFile.js";import{FormInputPassword as o}from"./controls/FormInputPassword.js";import{FormInputText as s}from"./controls/FormInputText.js";import{FormRadio as c}from"./controls/FormRadio.js";import{FormRadioGroup as l}from"./controls/FormRadioGroup.js";import{FormSelect as u}from"./controls/FormSelect.js";import{FormTextarea as d}from"./controls/FormTextarea.js";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{Children as m,cloneElement as h,isValidElement as g}from"react";import{FormProvider as _,useForm as v}from"react-hook-form";import{z as y}from"zod";import{zodResolver as b}from"@hookform/resolvers/zod";const x=({defaultValues:e,rules:t=y.object({}),onSubmit:n,children:r,...i})=>{let a=v({shouldFocusError:!0,resolver:b(t),defaultValues:e}),{register:o,handleSubmit:s,formState:{errors:c}}=a;return f(_,{...a,children:p(`form`,{onSubmit:s(n),...i,children:[w(r,o,c,t),f(`button`,{type:`submit`,children:`Submit`})]})})},S=[s,t,e,n,l,c,d,u,r,a,o,i],C=(e,t)=>{let n=e.shape[t];return n===void 0?!1:!(n.isOptional()||n.isNullable())},w=(e,t,n,r)=>m.map(e,e=>{if(!g(e))return e;let i=e.props;if(S.some(t=>e.type===t)&&i.name){let a={required:C(r,i.name),...i,error:n[i.name]?.message,...t(i.name,{setValueAs:e=>e===``||e===null?void 0:e})};return h(e,a)}return i.children?h(e,i,w(i.children,t,n,r)):e});x.InputText=s,x.Checkbox=e,x.CheckboxGroup=t,x.Combobox=n,x.RadioGroup=l,x.Radio=c,x.Textarea=d,x.Select=u,x.DatePicker=r,x.InputFile=a,x.InputPassword=o,x.IfField=i;export{x as Form};
|
|
2
2
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","names":["children: React.ReactNode","register: UseFormRegister<Record<string, string>>","errors: FieldErrors","value: unknown"],"sources":["../../../../src/components/forms/form/Form.tsx"],"sourcesContent":["import { Children, cloneElement, isValidElement, type ReactNode } from 'react';\nimport {\n type FieldErrors,\n FormProvider,\n type UseFormRegister,\n useForm,\n} from 'react-hook-form';\nimport { type
|
|
1
|
+
{"version":3,"file":"Form.js","names":["schema: ZodObject<ZodRawShape>","field: string","children: React.ReactNode","register: UseFormRegister<Record<string, string>>","errors: FieldErrors","rules: ZodObject<ZodRawShape>","value: unknown"],"sources":["../../../../src/components/forms/form/Form.tsx"],"sourcesContent":["import { Children, cloneElement, isValidElement, type ReactNode } from 'react';\nimport {\n type FieldErrors,\n FormProvider,\n type UseFormRegister,\n useForm,\n} from 'react-hook-form';\nimport { type ZodObject, type ZodRawShape, z } from 'zod';\n\nimport { zodResolver } from '@hookform/resolvers/zod';\n\nimport { FormCheckbox } from './controls/FormCheckbox';\nimport { FormCheckboxGroup } from './controls/FormCheckboxGroup';\nimport { FormCombobox } from './controls/FormCombobox';\nimport { FormDatePicker } from './controls/FormDatePicker';\nimport { FormIfField } from './controls/FormIfField';\nimport { FormInputFile } from './controls/FormInputFile';\nimport { FormInputPassword } from './controls/FormInputPassword';\nimport { FormInputText } from './controls/FormInputText';\nimport { FormRadio } from './controls/FormRadio';\nimport { FormRadioGroup } from './controls/FormRadioGroup';\nimport { FormSelect } from './controls/FormSelect';\nimport { FormTextarea } from './controls/FormTextarea';\n\nexport type FormProps = {\n defaultValues?: object;\n rules?: ZodObject<ZodRawShape>;\n onSubmit: (formData: object) => void;\n children: React.ReactNode;\n};\n\nexport const Form = ({\n defaultValues,\n rules = z.object({}),\n onSubmit,\n children,\n ...props\n}: FormProps) => {\n const form = useForm({\n shouldFocusError: true,\n resolver: zodResolver(rules),\n defaultValues,\n });\n const {\n register,\n handleSubmit,\n formState: { errors },\n } = form;\n\n return (\n <FormProvider {...form}>\n <form onSubmit={handleSubmit(onSubmit)} {...props}>\n {renderChildrenRecursively(children, register, errors, rules)}\n <button type='submit'>Submit</button>\n </form>\n </FormProvider>\n );\n};\n\nconst controlList = [\n FormInputText,\n FormCheckboxGroup,\n FormCheckbox,\n FormCombobox,\n FormRadioGroup,\n FormRadio,\n FormTextarea,\n FormSelect,\n FormDatePicker,\n FormInputFile,\n FormInputPassword,\n FormIfField,\n];\n\nconst isRequired = (schema: ZodObject<ZodRawShape>, field: string) => {\n const shape = schema.shape[field];\n if (shape === undefined) {\n return false;\n }\n\n return !(shape.isOptional() || shape.isNullable());\n};\n\nconst renderChildrenRecursively = (\n children: React.ReactNode,\n register: UseFormRegister<Record<string, string>>,\n errors: FieldErrors,\n rules: ZodObject<ZodRawShape>,\n): ReactNode => {\n return Children.map(children, (child) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n const props = child.props as {\n name?: string;\n type?: string;\n children?: ReactNode;\n };\n\n if (controlList.some((control) => child.type === control)) {\n if (props.name) {\n const newProps = {\n required: isRequired(rules, props.name),\n ...props,\n error: errors[props.name]?.message,\n ...register(props.name, {\n setValueAs: (value: unknown) =>\n value === '' || value === null ? undefined : value,\n }),\n };\n return cloneElement(child, newProps);\n }\n }\n\n if (props.children) {\n return cloneElement(\n child,\n props,\n renderChildrenRecursively(props.children, register, errors, rules),\n );\n }\n\n return child;\n });\n};\n\nForm.InputText = FormInputText;\nForm.Checkbox = FormCheckbox;\nForm.CheckboxGroup = FormCheckboxGroup;\nForm.Combobox = FormCombobox;\nForm.RadioGroup = FormRadioGroup;\nForm.Radio = FormRadio;\nForm.Textarea = FormTextarea;\nForm.Select = FormSelect;\nForm.DatePicker = FormDatePicker;\nForm.InputFile = FormInputFile;\nForm.InputPassword = FormInputPassword;\nForm.IfField = FormIfField;\n"],"mappings":"+8BAmFA,MApDa,EAAO,CAAC,CACnB,gBACA,QAAQ,EAAE,OAAO,CAAE,EAAC,CACpB,WACA,WACA,GAAG,EACO,GAAK,CAMf,IALM,EAAO,EAAQ,CACnB,kBAAkB,EAClB,SAAU,EAAY,EAAM,CAC5B,eACD,EAAC,CACI,CACJ,WACA,eACA,UAAW,CAAE,SAAQ,CACtB,CAAG,EAEJ,MACE,GAAC,EAAA,CAAa,GAAI,WAChB,EAAC,OAAA,CAAK,SAAU,EAAa,EAAS,CAAE,GAAI,YACzC,EAA0B,EAAU,EAAU,EAAQ,EAAM,CAC7D,EAAC,SAAA,CAAO,KAAK,kBAAS,UAAe,GAChC,EACM,AAElB,EAEK,EAAc,CAClB,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACD,EAEK,EAAa,CAACA,EAAgCC,IAAkB,CACpE,IAAM,EAAQ,EAAO,MAAM,GAK3B,OAJI,QAAA,IACK,IAGA,EAAM,YAAY,EAAI,EAAM,YAAY,CAClD,EAEK,EAA4B,CAChCC,EACAC,EACAC,EACAC,IAEO,EAAS,IAAI,EAAU,AAAC,GAAU,CACvC,IAAK,EAAe,EAAM,CACxB,OAAO,EAGT,IAAM,EAAQ,EAAM,MAMpB,GAAI,EAAY,KAAK,AAAC,GAAY,EAAM,OAAS,EAAQ,EACnD,EAAM,KAAM,CACd,IAAM,EAAW,CACf,SAAU,EAAW,EAAO,EAAM,KAAK,CACvC,GAAG,EACH,MAAO,EAAO,EAAM,OAAO,QAC3B,GAAG,EAAS,EAAM,KAAM,CACtB,WAAY,AAACC,GACX,IAAU,IAAM,IAAU,SAAA,GAAmB,CAChD,EAAC,AACH,EACD,MAAO,GAAa,EAAO,EAAS,AACrC,CAWH,OARI,EAAM,SACD,EACL,EACA,EACA,EAA0B,EAAM,SAAU,EAAU,EAAQ,EAAM,CACnE,CAGI,CACR,EAAC,CAcJ,AAXA,EAAK,UAAY,EACjB,EAAK,SAAW,EAChB,EAAK,cAAgB,EACrB,EAAK,SAAW,EAChB,EAAK,WAAa,EAClB,EAAK,MAAQ,EACb,EAAK,SAAW,EAChB,EAAK,OAAS,EACd,EAAK,WAAa,EAClB,EAAK,UAAY,EACjB,EAAK,cAAgB,EACrB,EAAK,QAAU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime34 from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/misc/visually-hidden/VisuallyHidden.d.ts
|
|
@@ -7,7 +7,7 @@ type VisuallyHiddenProps = {
|
|
|
7
7
|
};
|
|
8
8
|
declare const VisuallyHidden: ({
|
|
9
9
|
children
|
|
10
|
-
}: VisuallyHiddenProps) =>
|
|
10
|
+
}: VisuallyHiddenProps) => react_jsx_runtime34.JSX.Element;
|
|
11
11
|
//# sourceMappingURL=VisuallyHidden.d.ts.map
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisuallyHidden.d.ts","names":[],"sources":["../../../../src/components/misc/visually-hidden/VisuallyHidden.tsx"],"sourcesContent":[],"mappings":";;;;KAKY,mBAAA;YACA,KAAA,CAAM;;AADN,cAIC,cAJkB,EACnB,CAAA;EAAA;AAAe,CAAT,EAG2B,mBAHlB,EAAA,GAGqC,
|
|
1
|
+
{"version":3,"file":"VisuallyHidden.d.ts","names":[],"sources":["../../../../src/components/misc/visually-hidden/VisuallyHidden.tsx"],"sourcesContent":[],"mappings":";;;;KAKY,mBAAA;YACA,KAAA,CAAM;;AADN,cAIC,cAJkB,EACnB,CAAA;EAAA;AAAe,CAAT,EAG2B,mBAHlB,EAAA,GAGqC,mBAAA,CAAA,GAAA,CAAA,OAHrC;AAG3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime35 from "react/jsx-runtime";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/navigation/breadcrumbs/Breadcrumbs.d.ts
|
|
@@ -17,7 +17,7 @@ declare const Breadcrumbs: {
|
|
|
17
17
|
separator,
|
|
18
18
|
children,
|
|
19
19
|
classNames
|
|
20
|
-
}: BreadcrumbsProps):
|
|
20
|
+
}: BreadcrumbsProps): react_jsx_runtime35.JSX.Element;
|
|
21
21
|
Item: {
|
|
22
22
|
({
|
|
23
23
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","names":[],"sources":["../../../../src/components/navigation/breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":[],"mappings":";;;;KAgBY,gBAAA;cACE;;IADF,IAAA,CAAA,EAAA,MAAA;IAAgB,IAAA,CAAA,EAAA,MAAA;IACd,IAAA,CAAA,EAAA,MAAA;IAOD,SAAA,CAAA,EAAA,MAAA;EAAS,CAAA;EAGT,QAAA,CAAA,EAHA,SA6CZ;CAAA;AAAA,cA1CY,WA0CZ,EAAA;;;;;KAtCE,mBAAgB,
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","names":[],"sources":["../../../../src/components/navigation/breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":[],"mappings":";;;;KAgBY,gBAAA;cACE;;IADF,IAAA,CAAA,EAAA,MAAA;IAAgB,IAAA,CAAA,EAAA,MAAA;IACd,IAAA,CAAA,EAAA,MAAA;IAOD,SAAA,CAAA,EAAA,MAAA;EAAS,CAAA;EAGT,QAAA,CAAA,EAHA,SA6CZ;CAAA;AAAA,cA1CY,WA0CZ,EAAA;;;;;KAtCE,mBAAgB,mBAAA,CAAA,GAAA,CAAA;;IAAhB,CAAA;MAAA;IAAA,CAAA,EAyDyB,SAzDzB,CAAA,EAyDkC,SAzDlC;IAAgB,WAAA,EAAA,MAAA;EAAA,CAAA;;KAqDd,SAAA,GAIgC;EAAA,QAAA,EAHzB,SAGyB;AAnBnC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TabsListProps } from "./TabsList.js";
|
|
2
2
|
import { TabsTabProps } from "./TabsTab.js";
|
|
3
3
|
import { TabsPanelProps } from "./TabsPanel.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
5
5
|
import React from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/navigation/tabs/Tabs.d.ts
|
|
@@ -18,14 +18,14 @@ declare const Tabs: {
|
|
|
18
18
|
classNames,
|
|
19
19
|
children,
|
|
20
20
|
...props
|
|
21
|
-
}: TabsProps):
|
|
21
|
+
}: TabsProps): react_jsx_runtime1.JSX.Element;
|
|
22
22
|
displayName: string;
|
|
23
23
|
List: {
|
|
24
24
|
({
|
|
25
25
|
classNames,
|
|
26
26
|
children,
|
|
27
27
|
...props
|
|
28
|
-
}: TabsListProps):
|
|
28
|
+
}: TabsListProps): react_jsx_runtime1.JSX.Element;
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
31
31
|
Tab: {
|
|
@@ -35,7 +35,7 @@ declare const Tabs: {
|
|
|
35
35
|
endSlot,
|
|
36
36
|
children,
|
|
37
37
|
...props
|
|
38
|
-
}: TabsTabProps):
|
|
38
|
+
}: TabsTabProps): react_jsx_runtime1.JSX.Element;
|
|
39
39
|
displayName: string;
|
|
40
40
|
};
|
|
41
41
|
Panel: {
|
|
@@ -43,7 +43,7 @@ declare const Tabs: {
|
|
|
43
43
|
classNames,
|
|
44
44
|
children,
|
|
45
45
|
...props
|
|
46
|
-
}: TabsPanelProps):
|
|
46
|
+
}: TabsPanelProps): react_jsx_runtime1.JSX.Element;
|
|
47
47
|
displayName: string;
|
|
48
48
|
};
|
|
49
49
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mage-ui/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [],
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"react-dom": "^19.1.0",
|
|
43
43
|
"react-hook-form": "^7.56.4",
|
|
44
44
|
"zod": "^3.25.42",
|
|
45
|
-
"@mage-ui/preset": "0.0.
|
|
46
|
-
"@mage-ui/styled-system": "0.0.
|
|
45
|
+
"@mage-ui/preset": "0.0.29",
|
|
46
|
+
"@mage-ui/styled-system": "0.0.29"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=22.14.0"
|