@mage-ui/components 0.0.31 → 0.0.32
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/Button.d.ts.map +1 -1
- package/dist/components/buttons/button-icon/ButtonIcon.d.ts +2 -2
- 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/forms/form/Form.d.ts +21 -21
- 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/tabs/Tabs.d.ts +5 -5
- package/dist/components/navigation/tabs/Tabs.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 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_runtime11.JSX.Element;
|
|
22
22
|
//# sourceMappingURL=Button.d.ts.map
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","names":[],"sources":["../../../../src/components/buttons/button/Button.tsx"],"sourcesContent":[],"mappings":";;;;KASY,WAAA,GAAc;;;IAAd,KAAA,CAAA,EAAA,MAAW;IAAA,OAAA,CAAA,EAAA,MAAA;EAAA,CAAA;EAAiB,SAM1B,CAAA,EAAA,SAAA;EAAS,OACX,CAAA,EAAA,SAAA;EAAS,QACR,CAAA,EAAA,SAAA;AAAS,CAAA;AAGT,cAAA,MAqBZ,EAAA,CAAA;EAAA,UAAA;EAAA,SAAA;EAAA,OAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAfE,WAeF,EAAA,GAfa,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","names":[],"sources":["../../../../src/components/buttons/button/Button.tsx"],"sourcesContent":[],"mappings":";;;;KASY,WAAA,GAAc;;;IAAd,KAAA,CAAA,EAAA,MAAW;IAAA,OAAA,CAAA,EAAA,MAAA;EAAA,CAAA;EAAiB,SAM1B,CAAA,EAAA,SAAA;EAAS,OACX,CAAA,EAAA,SAAA;EAAS,QACR,CAAA,EAAA,SAAA;AAAS,CAAA;AAGT,cAAA,MAqBZ,EAAA,CAAA;EAAA,UAAA;EAAA,SAAA;EAAA,OAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAfE,WAeF,EAAA,GAfa,mBAAA,CAAA,GAAA,CAAA,OAeb"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from "../button/Button.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 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_runtime2.JSX.Element;
|
|
19
19
|
//# sourceMappingURL=ButtonIcon.d.ts.map
|
|
20
20
|
|
|
21
21
|
//#endregion
|
|
@@ -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_runtime13 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_runtime13.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_runtime14 from "react/jsx-runtime";
|
|
2
|
+
import * as react15 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_runtime14.JSX.Element;
|
|
22
22
|
Option: {
|
|
23
23
|
({
|
|
24
24
|
children
|
|
25
|
-
}: DropdownButtonOptionProps):
|
|
25
|
+
}: DropdownButtonOptionProps): react15.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_runtime16 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_runtime16.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_runtime17 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_runtime17.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_runtime18 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_runtime18.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_runtime19 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_runtime19.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_runtime10 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_runtime10.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_runtime45 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_runtime45.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_runtime46 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_runtime46.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_runtime47 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_runtime47.JSX.Element;
|
|
44
44
|
Slide: {
|
|
45
45
|
({
|
|
46
46
|
children
|
|
@@ -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_runtime20 from "react/jsx-runtime";
|
|
15
15
|
import { ReactNode } from "react";
|
|
16
|
-
import { ZodObject, ZodRawShape, z } from "zod";
|
|
16
|
+
import { ZodEffects, 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?: ZodObject<ZodRawShape
|
|
21
|
+
rules?: ZodObject<ZodRawShape> | ZodEffects<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_runtime20.JSX.Element;
|
|
33
33
|
InputText: {
|
|
34
34
|
({
|
|
35
35
|
...props
|
|
36
|
-
}: FormInputTextProps):
|
|
36
|
+
}: FormInputTextProps): react_jsx_runtime20.JSX.Element;
|
|
37
37
|
displayName: string;
|
|
38
38
|
rules: {
|
|
39
39
|
required: (message?: string, min?: number) => z.ZodString;
|
|
@@ -44,10 +44,10 @@ declare const Form: {
|
|
|
44
44
|
name,
|
|
45
45
|
control,
|
|
46
46
|
...props
|
|
47
|
-
}: FormCheckboxProps):
|
|
47
|
+
}: FormCheckboxProps): react_jsx_runtime20.JSX.Element;
|
|
48
48
|
displayName: string;
|
|
49
49
|
rules: {
|
|
50
|
-
required: (message?: string) =>
|
|
50
|
+
required: (message?: string) => ZodEffects<z.ZodBoolean, boolean, boolean>;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
CheckboxGroup: {
|
|
@@ -56,7 +56,7 @@ declare const Form: {
|
|
|
56
56
|
control,
|
|
57
57
|
children,
|
|
58
58
|
...props
|
|
59
|
-
}: FormCheckboxGroupProps):
|
|
59
|
+
}: FormCheckboxGroupProps): react_jsx_runtime20.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_runtime20.JSX.Element;
|
|
78
78
|
displayName: string;
|
|
79
79
|
rules: {
|
|
80
80
|
required: (message?: string, defaultValue?: {
|
|
81
81
|
id: string;
|
|
82
82
|
value: null;
|
|
83
|
-
}) =>
|
|
83
|
+
}) => 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_runtime20.JSX.Element;
|
|
108
108
|
displayName: string;
|
|
109
109
|
rules: {
|
|
110
|
-
required: (message?: string) =>
|
|
110
|
+
required: (message?: string) => ZodEffects<z.ZodAny, any, any>;
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
Radio: {
|
|
114
|
-
(props: RadioProps):
|
|
114
|
+
(props: RadioProps): react_jsx_runtime20.JSX.Element;
|
|
115
115
|
displayName: string;
|
|
116
116
|
};
|
|
117
117
|
Textarea: {
|
|
118
118
|
({
|
|
119
119
|
...props
|
|
120
|
-
}: FormTextareaProps):
|
|
120
|
+
}: FormTextareaProps): react_jsx_runtime20.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_runtime20.JSX.Element;
|
|
132
132
|
displayName: string;
|
|
133
133
|
rules: {
|
|
134
134
|
required: (message?: string, defaultValue?: {
|
|
135
135
|
id: string;
|
|
136
136
|
value: null;
|
|
137
|
-
}) =>
|
|
137
|
+
}) => 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_runtime20.JSX.Element;
|
|
161
161
|
displayName: string;
|
|
162
162
|
rules: {
|
|
163
|
-
required: (message?: string) =>
|
|
163
|
+
required: (message?: string) => ZodEffects<z.ZodUnion<[z.ZodType<Date, z.ZodTypeDef, Date>, ZodEffects<z.ZodString, string, string>]>, string | Date, string | Date>;
|
|
164
164
|
};
|
|
165
165
|
};
|
|
166
166
|
InputFile: {
|
|
@@ -168,16 +168,16 @@ declare const Form: {
|
|
|
168
168
|
control,
|
|
169
169
|
name,
|
|
170
170
|
...props
|
|
171
|
-
}: FormInputFileProps):
|
|
171
|
+
}: FormInputFileProps): react_jsx_runtime20.JSX.Element;
|
|
172
172
|
displayName: string;
|
|
173
173
|
rules: {
|
|
174
|
-
required: (message?: string, min?: number) =>
|
|
174
|
+
required: (message?: string, min?: number) => ZodEffects<z.ZodAny, any, any>;
|
|
175
175
|
};
|
|
176
176
|
};
|
|
177
177
|
InputPassword: {
|
|
178
178
|
({
|
|
179
179
|
...props
|
|
180
|
-
}: FormInputPasswordProps):
|
|
180
|
+
}: FormInputPasswordProps): react_jsx_runtime20.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,UAAU;;
|
|
1
|
+
{"version":3,"file":"Form.d.ts","names":[],"sources":["../../../../src/components/forms/form/Form.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;KAwBY,SAAA;;UAEF,UAAU,eAAe,WAAW,UAAU;;YAE5C,KAAA,CAAM;;cAGL;;;;;;;KAMV,YAAS,mBAAA,CAAA,GAAA,CAAA;;;;OAAA;;;;;;;IAbA,CAAA;MAAA,IAAA;MAAS,OAAA;MAAA,GAAA;IAAA,CAAA,mBAAA,CAAA,iCAAA;IAAA,WAAA,EAAA,MAAA;IAED,KAAA,EAAA;MAAV,QAAA,EAAA,CAAA,OAAA,CAAA,EAAA,MAAA,EAAA,aAAA,aAAA,EAAA,OAAA,EAAA,OAAA,CAAA;IAA8C,CAAA;EAAW,CAAA;EAAZ,aAApB,EAAA;IAEvB,CAAA;MAAA,IAAM;MAAA,OAAA;MAAA,QAAA;MAAA,GAAA;IAAA,CAAA,wBAAA,CAAA,iCAAA;IAAS,WAAA,EAAA,MAAA;IAGd,KA+BZ,EAAA;MAAA,QAAA,EAAA,CAAA,OAAA,CAAA,EAAA,MAAA,EAAA,aAAA,YAAA,EAAA,MAAA,CAAA;IAAA,CAAA;;;;;;;IAzBE,CAAA;EAAS,CAAA;EAAA,QAAA,EAAA"}
|
|
@@ -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
|
|
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{ZodEffects as y,z as b}from"zod";import{zodResolver as x}from"@hookform/resolvers/zod";const S=({defaultValues:e,rules:t=b.object({}).refine(()=>{}),onSubmit:n,children:r,...i})=>{let a=t instanceof y?t._def.schema:t,o=v({shouldFocusError:!0,...t&&Object.keys(a?.shape||{}).length>0?{resolver:x(a)}:{},defaultValues:e}),{register:s,handleSubmit:c,formState:{errors:l}}=o;return f(_,{...o,children:p(`form`,{onSubmit:c(n),...i,children:[T(r,s,l,a),f(`button`,{type:`submit`,children:`Submit`})]})})},C=[s,t,e,n,l,c,d,u,r,a,o,i],w=(e,t)=>{let n=e?.shape?.[t]||void 0;return n===void 0?!1:!(n.isOptional()||n.isNullable())},T=(e,t,n,r)=>m.map(e,e=>{if(!g(e))return e;let i=e.props;if(C.some(t=>e.type===t)&&i.name){let a={required:w(r,i.name),error:n[i.name]?.message,...i,...t(i.name,{setValueAs:e=>e===``||e===null?void 0:e})};return h(e,a)}return i.children?h(e,i,T(i.children,t,n,r)):e});S.InputText=s,S.Checkbox=e,S.CheckboxGroup=t,S.Combobox=n,S.RadioGroup=l,S.Radio=c,S.Textarea=d,S.Select=u,S.DatePicker=r,S.InputFile=a,S.InputPassword=o,S.IfField=i;export{S as Form};
|
|
2
2
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 { ZodEffects, 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> | ZodEffects<ZodObject<ZodRawShape>>;\n onSubmit: (formData: object) => void;\n children: React.ReactNode;\n};\n\nexport const Form = ({\n defaultValues,\n rules = z.object({}).refine(() => {}),\n onSubmit,\n children,\n ...props\n}: FormProps) => {\n const schema: ZodObject<ZodRawShape> =\n rules instanceof ZodEffects ? rules._def.schema : rules;\n\n const form = useForm({\n shouldFocusError: true,\n ...(rules && Object.keys(schema?.shape || {}).length > 0\n ? { resolver: zodResolver(schema) }\n : {}),\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, schema)}\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] || undefined;\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 error: errors[props.name]?.message,\n ...props,\n ...register(props.name, {\n setValueAs: (value: unknown) => {\n return value === '' || value === null ? undefined : value;\n },\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":"+9BAwFA,MAzDa,EAAO,CAAC,CACnB,gBACA,QAAQ,EAAE,OAAO,CAAE,EAAC,CAAC,OAAO,IAAM,CAAE,EAAC,CACrC,WACA,WACA,GAAG,EACO,GAAK,CAWf,IAVMA,EACJ,aAAiB,EAAa,EAAM,KAAK,OAAS,EAE9C,EAAO,EAAQ,CACnB,kBAAkB,EAClB,GAAI,GAAS,OAAO,KAAK,GAAQ,OAAS,CAAE,EAAC,CAAC,OAAS,EACnD,CAAE,SAAU,EAAY,EAAO,AAAE,EACjC,CAAE,EACN,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,EAAO,CAC9D,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,GAAQ,QAAQ,QAAA,GAK9B,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,MAAO,EAAO,EAAM,OAAO,QAC3B,GAAG,EACH,GAAG,EAAS,EAAM,KAAM,CACtB,WAAY,AAACC,GACJ,IAAU,IAAM,IAAU,SAAA,GAAmB,CAEvD,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_runtime1 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_runtime1.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,kBAAA,CAAA,GAAA,CAAA,OAHrC;AAG3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime12 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_runtime12.JSX.Element;
|
|
21
21
|
Item: {
|
|
22
22
|
({
|
|
23
23
|
children
|
|
@@ -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_runtime3 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_runtime3.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_runtime3.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_runtime3.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_runtime3.JSX.Element;
|
|
47
47
|
displayName: string;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","names":[],"sources":["../../../../src/components/navigation/tabs/Tabs.tsx"],"sourcesContent":[],"mappings":";;;;;;;KASY,SAAA;;;;aAIC,KAAA,CAAM;;EAJP,KAAA,CAAA,EAAA,MAAS;AASrB,CAAA;AAWC,cAXY,IAWZ,EAAA;EAAA,CAAA;IAAA,UAAA;IAAA,QAAA;IAAA,GAAA;EAAA,CAAA,EAXwD,SAWxD,CAAA,EAXiE,
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","names":[],"sources":["../../../../src/components/navigation/tabs/Tabs.tsx"],"sourcesContent":[],"mappings":";;;;;;;KASY,SAAA;;;;aAIC,KAAA,CAAM;;EAJP,KAAA,CAAA,EAAA,MAAS;AASrB,CAAA;AAWC,cAXY,IAWZ,EAAA;EAAA,CAAA;IAAA,UAAA;IAAA,QAAA;IAAA,GAAA;EAAA,CAAA,EAXwD,SAWxD,CAAA,EAXiE,kBAAA,CAAA,GAAA,CAAA,OAWjE;;MAXwD,EAAA;IAAS,CAAA;MAAA,UAAA;MAAA,QAAA;MAAA,GAAA;IAAA,CAAA,eAAA,CAAA,gCAAA;IAAA,WAAA,EAAA,MAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mage-ui/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
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.32",
|
|
46
|
+
"@mage-ui/styled-system": "0.0.32"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=22.14.0"
|