fina-react-ds 1.0.37 → 1.0.38
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/form-file-uploader.d.ts +2 -1
- package/dist/components/form-file-uploader.js +18 -16
- package/dist/components/form-image-uploader.d.ts +2 -1
- package/dist/components/form-image-uploader.js +23 -14
- package/dist/components/form-input.d.ts +2 -1
- package/dist/components/form-input.js +22 -20
- package/dist/components/form-select.d.ts +2 -1
- package/dist/components/form-select.js +31 -29
- package/dist/components/form-textarea.d.ts +2 -1
- package/dist/components/form-textarea.js +22 -20
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FileUploader } from "./file-uploader";
|
|
2
|
-
export declare function FormFileUploader({ name, label, required, ...props }: {
|
|
2
|
+
export declare function FormFileUploader({ name, label, description, required, ...props }: {
|
|
3
3
|
name: string;
|
|
4
4
|
label: string;
|
|
5
|
+
description?: string;
|
|
5
6
|
required?: boolean;
|
|
6
7
|
} & React.ComponentProps<typeof FileUploader>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var m = (o, e) =>
|
|
3
|
-
import { jsx as r, jsxs as
|
|
4
|
-
import { useFormContext as
|
|
5
|
-
import { FormField as f, FormItem as p, FormLabel as a, FormControl as
|
|
6
|
-
import { FileUploader as
|
|
7
|
-
function
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var m = (o, e) => d(o, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
4
|
+
import { useFormContext as c } from "react-hook-form";
|
|
5
|
+
import { FormField as f, FormItem as p, FormLabel as a, FormControl as h, FormDescription as u, FormMessage as x } from "./form.js";
|
|
6
|
+
import { FileUploader as j } from "./file-uploader.js";
|
|
7
|
+
function I({
|
|
8
8
|
name: o,
|
|
9
9
|
label: e,
|
|
10
|
-
|
|
10
|
+
description: l,
|
|
11
|
+
required: i = !1,
|
|
11
12
|
...t
|
|
12
13
|
}) {
|
|
13
|
-
const { control:
|
|
14
|
+
const { control: n } = c();
|
|
14
15
|
return /* @__PURE__ */ r(
|
|
15
16
|
f,
|
|
16
17
|
{
|
|
17
|
-
control:
|
|
18
|
+
control: n,
|
|
18
19
|
name: o,
|
|
19
|
-
render: /* @__PURE__ */ m(({ field: { value:
|
|
20
|
-
/* @__PURE__ */ r(a, { required:
|
|
21
|
-
/* @__PURE__ */ r(
|
|
22
|
-
/* @__PURE__ */ r(u, {})
|
|
20
|
+
render: /* @__PURE__ */ m(({ field: { value: C, ...F } }) => /* @__PURE__ */ s(p, { children: [
|
|
21
|
+
/* @__PURE__ */ r(a, { required: i, children: e }),
|
|
22
|
+
/* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(j, { ...F, ...t }) }),
|
|
23
|
+
l && /* @__PURE__ */ r(u, { children: l }),
|
|
24
|
+
/* @__PURE__ */ r(x, {})
|
|
23
25
|
] }), "render")
|
|
24
26
|
}
|
|
25
27
|
);
|
|
26
28
|
}
|
|
27
|
-
m(
|
|
29
|
+
m(I, "FormFileUploader");
|
|
28
30
|
export {
|
|
29
|
-
|
|
31
|
+
I as FormFileUploader
|
|
30
32
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ImageUploader } from "./image-uploader";
|
|
2
|
-
export declare function FormImageUploader({ name, label, required, actualImageUrl, ...props }: {
|
|
2
|
+
export declare function FormImageUploader({ name, label, description, required, actualImageUrl, ...props }: {
|
|
3
3
|
name: string;
|
|
4
4
|
label: string;
|
|
5
|
+
description?: string;
|
|
5
6
|
required?: boolean;
|
|
6
7
|
actualImageUrl?: string;
|
|
7
8
|
} & React.ComponentProps<typeof ImageUploader>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,31 +1,40 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
2
|
var m = (o, e) => d(o, "name", { value: e, configurable: !0 });
|
|
3
3
|
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
4
|
-
import { useFormContext as
|
|
5
|
-
import { FormField as f, FormItem as p, FormLabel as
|
|
6
|
-
import { ImageUploader as
|
|
7
|
-
function
|
|
4
|
+
import { useFormContext as c } from "react-hook-form";
|
|
5
|
+
import { FormField as f, FormItem as p, FormLabel as h, FormControl as u, FormDescription as x, FormMessage as g } from "./form.js";
|
|
6
|
+
import { ImageUploader as I } from "./image-uploader.js";
|
|
7
|
+
function L({
|
|
8
8
|
name: o,
|
|
9
9
|
label: e,
|
|
10
|
+
description: l,
|
|
10
11
|
required: t = !1,
|
|
11
|
-
actualImageUrl:
|
|
12
|
-
...
|
|
12
|
+
actualImageUrl: n = "",
|
|
13
|
+
...i
|
|
13
14
|
}) {
|
|
14
|
-
const { control:
|
|
15
|
+
const { control: F } = c();
|
|
15
16
|
return /* @__PURE__ */ r(
|
|
16
17
|
f,
|
|
17
18
|
{
|
|
18
|
-
control:
|
|
19
|
+
control: F,
|
|
19
20
|
name: o,
|
|
20
|
-
render: /* @__PURE__ */ m(({ field: { value:
|
|
21
|
-
/* @__PURE__ */ r(
|
|
22
|
-
/* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
|
|
23
|
-
|
|
21
|
+
render: /* @__PURE__ */ m(({ field: { value: j, ...a } }) => /* @__PURE__ */ s(p, { children: [
|
|
22
|
+
/* @__PURE__ */ r(h, { required: t, children: e }),
|
|
23
|
+
/* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
|
|
24
|
+
I,
|
|
25
|
+
{
|
|
26
|
+
actualImageUrl: n,
|
|
27
|
+
...a,
|
|
28
|
+
...i
|
|
29
|
+
}
|
|
30
|
+
) }),
|
|
31
|
+
l && /* @__PURE__ */ r(x, { children: l }),
|
|
32
|
+
/* @__PURE__ */ r(g, {})
|
|
24
33
|
] }), "render")
|
|
25
34
|
}
|
|
26
35
|
);
|
|
27
36
|
}
|
|
28
|
-
m(
|
|
37
|
+
m(L, "FormImageUploader");
|
|
29
38
|
export {
|
|
30
|
-
|
|
39
|
+
L as FormImageUploader
|
|
31
40
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Input } from "./input";
|
|
2
|
-
export declare function FormInput({ name, label, required, ...props }: {
|
|
2
|
+
export declare function FormInput({ name, label, description, required, ...props }: {
|
|
3
3
|
name: string;
|
|
4
4
|
label: string;
|
|
5
|
+
description?: string;
|
|
5
6
|
required: boolean;
|
|
6
7
|
} & React.ComponentProps<typeof Input>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsx as r, jsxs as
|
|
4
|
-
import { useFormContext as
|
|
5
|
-
import { FormField as
|
|
6
|
-
import { Input as
|
|
7
|
-
function
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var m = (o, e) => p(o, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
4
|
+
import { useFormContext as f } from "react-hook-form";
|
|
5
|
+
import { FormField as d, FormItem as a, FormLabel as h, FormControl as x, FormDescription as I, FormMessage as j } from "./form.js";
|
|
6
|
+
import { Input as v } from "./input.js";
|
|
7
|
+
function M({
|
|
8
8
|
name: o,
|
|
9
9
|
label: e,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
description: t,
|
|
11
|
+
required: n = !1,
|
|
12
|
+
...l
|
|
12
13
|
}) {
|
|
13
|
-
const { control:
|
|
14
|
+
const { control: i } = f();
|
|
14
15
|
return /* @__PURE__ */ r(
|
|
15
|
-
|
|
16
|
+
d,
|
|
16
17
|
{
|
|
17
|
-
control:
|
|
18
|
+
control: i,
|
|
18
19
|
name: o,
|
|
19
|
-
render: /* @__PURE__ */
|
|
20
|
-
const { value:
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */ r(
|
|
23
|
-
/* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(
|
|
24
|
-
/* @__PURE__ */ r(
|
|
20
|
+
render: /* @__PURE__ */ m(({ field: s }) => {
|
|
21
|
+
const { value: F, ...c } = s;
|
|
22
|
+
return /* @__PURE__ */ u(a, { children: [
|
|
23
|
+
/* @__PURE__ */ r(h, { required: n, children: e }),
|
|
24
|
+
/* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(v, { value: F ?? "", ...c, ...l }) }),
|
|
25
|
+
t && /* @__PURE__ */ r(I, { children: t }),
|
|
26
|
+
/* @__PURE__ */ r(j, {})
|
|
25
27
|
] });
|
|
26
28
|
}, "render")
|
|
27
29
|
}
|
|
28
30
|
);
|
|
29
31
|
}
|
|
30
|
-
|
|
32
|
+
m(M, "FormInput");
|
|
31
33
|
export {
|
|
32
|
-
|
|
34
|
+
M as FormInput
|
|
33
35
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Select } from "./select";
|
|
2
|
-
export declare function FormSelect({ name, label, required, options, isMulti, isClearable, onChange, ...props }: {
|
|
2
|
+
export declare function FormSelect({ name, label, description, required, options, isMulti, isClearable, onChange, ...props }: {
|
|
3
3
|
name: string;
|
|
4
4
|
label: string;
|
|
5
|
+
description?: string;
|
|
5
6
|
required?: boolean;
|
|
6
7
|
options: {
|
|
7
8
|
value: string;
|
|
@@ -1,49 +1,51 @@
|
|
|
1
|
-
var
|
|
2
|
-
var o = (e, n) =>
|
|
3
|
-
import { jsx as r, jsxs as
|
|
4
|
-
import { useFormContext as
|
|
5
|
-
import { FormField as
|
|
6
|
-
import { Select as
|
|
7
|
-
function
|
|
1
|
+
var x = Object.defineProperty;
|
|
2
|
+
var o = (e, n) => x(e, "name", { value: n, configurable: !0 });
|
|
3
|
+
import { jsx as r, jsxs as C } from "react/jsx-runtime";
|
|
4
|
+
import { useFormContext as g } from "react-hook-form";
|
|
5
|
+
import { FormField as u, FormItem as j, FormLabel as S, FormControl as b, FormDescription as D, FormMessage as I } from "./form.js";
|
|
6
|
+
import { Select as L } from "./select.js";
|
|
7
|
+
function v({
|
|
8
8
|
name: e,
|
|
9
9
|
label: n,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
description: m,
|
|
11
|
+
required: l = !1,
|
|
12
|
+
options: s,
|
|
13
|
+
isMulti: f = !1,
|
|
14
|
+
isClearable: c = !1,
|
|
14
15
|
onChange: t = void 0,
|
|
15
|
-
...
|
|
16
|
+
...F
|
|
16
17
|
}) {
|
|
17
|
-
const { control: d } =
|
|
18
|
+
const { control: d } = g();
|
|
18
19
|
return /* @__PURE__ */ r(
|
|
19
|
-
|
|
20
|
+
u,
|
|
20
21
|
{
|
|
21
22
|
control: d,
|
|
22
23
|
name: e,
|
|
23
|
-
render: /* @__PURE__ */ o(({ field:
|
|
24
|
-
const { onChange:
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */ r(
|
|
27
|
-
/* @__PURE__ */ r(
|
|
28
|
-
|
|
24
|
+
render: /* @__PURE__ */ o(({ field: a }) => {
|
|
25
|
+
const { onChange: h, ...p } = a;
|
|
26
|
+
return /* @__PURE__ */ C(j, { children: [
|
|
27
|
+
/* @__PURE__ */ r(S, { required: l, children: n }),
|
|
28
|
+
/* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(
|
|
29
|
+
L,
|
|
29
30
|
{
|
|
30
|
-
onChange: /* @__PURE__ */ o((
|
|
31
|
-
|
|
31
|
+
onChange: /* @__PURE__ */ o((i) => {
|
|
32
|
+
h(i), t && t(i);
|
|
32
33
|
}, "onChange"),
|
|
33
34
|
...p,
|
|
34
|
-
options:
|
|
35
|
-
isMulti:
|
|
36
|
-
isClearable:
|
|
37
|
-
...
|
|
35
|
+
options: s,
|
|
36
|
+
isMulti: f,
|
|
37
|
+
isClearable: c,
|
|
38
|
+
...F
|
|
38
39
|
}
|
|
39
40
|
) }),
|
|
40
|
-
/* @__PURE__ */ r(
|
|
41
|
+
m && /* @__PURE__ */ r(D, { children: m }),
|
|
42
|
+
/* @__PURE__ */ r(I, {})
|
|
41
43
|
] });
|
|
42
44
|
}, "render")
|
|
43
45
|
}
|
|
44
46
|
);
|
|
45
47
|
}
|
|
46
|
-
o(
|
|
48
|
+
o(v, "FormSelect");
|
|
47
49
|
export {
|
|
48
|
-
|
|
50
|
+
v as FormSelect
|
|
49
51
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Textarea } from "./textarea";
|
|
2
|
-
export declare function FormTextarea({ name, label, required, ...props }: {
|
|
2
|
+
export declare function FormTextarea({ name, label, description, required, ...props }: {
|
|
3
3
|
name: string;
|
|
4
4
|
label: string;
|
|
5
|
+
description?: string;
|
|
5
6
|
required?: boolean;
|
|
6
7
|
} & React.ComponentProps<typeof Textarea>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsx as r, jsxs as
|
|
4
|
-
import { useFormContext as
|
|
5
|
-
import { FormField as
|
|
6
|
-
import { Textarea as
|
|
7
|
-
function
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var m = (o, e) => c(o, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as r, jsxs as f } from "react/jsx-runtime";
|
|
4
|
+
import { useFormContext as d } from "react-hook-form";
|
|
5
|
+
import { FormField as p, FormItem as u, FormLabel as x, FormControl as h, FormDescription as j, FormMessage as v } from "./form.js";
|
|
6
|
+
import { Textarea as C } from "./textarea.js";
|
|
7
|
+
function L({
|
|
8
8
|
name: o,
|
|
9
9
|
label: e,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
description: t,
|
|
11
|
+
required: n = !1,
|
|
12
|
+
...l
|
|
12
13
|
}) {
|
|
13
|
-
const { control:
|
|
14
|
+
const { control: i } = d();
|
|
14
15
|
return /* @__PURE__ */ r(
|
|
15
|
-
|
|
16
|
+
p,
|
|
16
17
|
{
|
|
17
|
-
control:
|
|
18
|
+
control: i,
|
|
18
19
|
name: o,
|
|
19
|
-
render: /* @__PURE__ */
|
|
20
|
-
const { value:
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */ r(
|
|
23
|
-
/* @__PURE__ */ r(
|
|
24
|
-
/* @__PURE__ */ r(
|
|
20
|
+
render: /* @__PURE__ */ m(({ field: s }) => {
|
|
21
|
+
const { value: a, ...F } = s;
|
|
22
|
+
return /* @__PURE__ */ f(u, { children: [
|
|
23
|
+
/* @__PURE__ */ r(x, { required: n, children: e }),
|
|
24
|
+
/* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(C, { value: a ?? "", ...F, ...l }) }),
|
|
25
|
+
t && /* @__PURE__ */ r(j, { children: t }),
|
|
26
|
+
/* @__PURE__ */ r(v, {})
|
|
25
27
|
] });
|
|
26
28
|
}, "render")
|
|
27
29
|
}
|
|
28
30
|
);
|
|
29
31
|
}
|
|
30
|
-
|
|
32
|
+
m(L, "FormTextarea");
|
|
31
33
|
export {
|
|
32
|
-
|
|
34
|
+
L as FormTextarea
|
|
33
35
|
};
|