@oneplatformdev/ui 0.0.1-beta.68 → 0.0.1-beta.69
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/Alert/Alert.mjs +6 -7
- package/AreaChart/AreaChart.mjs +4 -5
- package/Badge/Badge.mjs +6 -7
- package/Calendar/Calendar.mjs +0 -1
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Command/Command.mjs +2 -3
- package/DataTable/DataTable.mjs +15 -16
- package/Dropzone/Dropzone.mjs +1 -1
- package/Dropzone/DropzoneFilePreview.mjs +1 -1
- package/Dropzone/index.mjs +1 -1
- package/{DropzoneFilePreview-C-SoCoO0.js → DropzoneFilePreview-Dhtv8F4u.js} +15 -16
- package/Form/Form.mjs +4 -5
- package/Form/FormRenderControl.mjs +6 -7
- package/FormCheckbox/FormCheckbox.mjs +9 -10
- package/FormCombobox/FormCombobox.mjs +12 -13
- package/FormDatePicker/FormDatePicker.mjs +6 -7
- package/FormDropzone/FormDropzone.mjs +6 -7
- package/FormInput/FormInput.mjs +6 -7
- package/FormRadio/FormRadio.mjs +10 -11
- package/FormSelect/FormSelect.mjs +5 -6
- package/FormTextarea/FormTextarea.mjs +9 -10
- package/Header/Header.mjs +6 -7
- package/Label/Label.mjs +6 -7
- package/LoadingMask/LoadingMask.mjs +6 -7
- package/LoadingProgress/LoadingProgress.mjs +2 -3
- package/Radio/Radio.mjs +7 -8
- package/Skeleton/Skeleton.mjs +8 -9
- package/TablePagination/TablePagination.mjs +8 -9
- package/Textarea/Textarea.mjs +72 -5
- package/Textarea/index.mjs +2 -2
- package/Textarea/useAutosizeTextArea.mjs +18 -65
- package/Theme/ThemeProvider.mjs +13 -14
- package/Toast/Toast.mjs +2 -3
- package/ToggleGroup/ToggleGroup.mjs +6 -7
- package/Tooltip/Tooltip.mjs +2 -3
- package/index.mjs +2 -2
- package/package.json +1 -1
- package/Textarea-D1CCXy7E.js +0 -149
package/Alert/Alert.mjs
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
2
2
|
import * as i from "react";
|
3
|
-
import "
|
4
|
-
import { cn as o } from "@oneplatformdev/utils";
|
3
|
+
import { cn as l } from "@oneplatformdev/utils";
|
5
4
|
import { alertVariants as m } from "./alertVariants.mjs";
|
6
|
-
const s = i.forwardRef(({ className: e, variant: r, ...t },
|
5
|
+
const s = i.forwardRef(({ className: e, variant: r, ...t }, o) => /* @__PURE__ */ a(
|
7
6
|
"div",
|
8
7
|
{
|
9
|
-
ref:
|
8
|
+
ref: o,
|
10
9
|
role: "alert",
|
11
|
-
className:
|
10
|
+
className: l(m({ variant: r }), e),
|
12
11
|
...t
|
13
12
|
}
|
14
13
|
));
|
@@ -17,7 +16,7 @@ const n = i.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
|
|
17
16
|
"h5",
|
18
17
|
{
|
19
18
|
ref: t,
|
20
|
-
className:
|
19
|
+
className: l("mb-1 font-medium leading-none tracking-tight", e),
|
21
20
|
...r
|
22
21
|
}
|
23
22
|
));
|
@@ -26,7 +25,7 @@ const d = i.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
|
|
26
25
|
"div",
|
27
26
|
{
|
28
27
|
ref: t,
|
29
|
-
className:
|
28
|
+
className: l("text-sm [&_p]:leading-relaxed", e),
|
30
29
|
...r
|
31
30
|
}
|
32
31
|
));
|
package/AreaChart/AreaChart.mjs
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
2
|
-
import "react";
|
3
2
|
import { AreaChart as s, CartesianGrid as n, XAxis as l, YAxis as h, Area as p } from "recharts";
|
4
|
-
import { ChartContainer as d, ChartTooltip as f, ChartTooltipContent as
|
5
|
-
const
|
3
|
+
import { ChartContainer as d, ChartTooltip as f, ChartTooltipContent as c } from "../Chart/Chart.mjs";
|
4
|
+
const k = ({ data: o, config: i }) => /* @__PURE__ */ t(d, { config: i, className: "h-[350px] w-full", children: /* @__PURE__ */ a(s, { data: o, width: 808, height: 350, margin: { top: 10, right: 10, left: 0, bottom: 0 }, children: [
|
6
5
|
/* @__PURE__ */ t("defs", { children: Object.entries(i).map(([e, { color: r }]) => /* @__PURE__ */ a("linearGradient", { id: `${e}Gradient`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
7
6
|
/* @__PURE__ */ t("stop", { offset: "5%", stopColor: r, stopOpacity: 0.8 }),
|
8
7
|
/* @__PURE__ */ t("stop", { offset: "95%", stopColor: r, stopOpacity: 0.1 })
|
@@ -10,7 +9,7 @@ const y = ({ data: o, config: i }) => /* @__PURE__ */ t(d, { config: i, classNam
|
|
10
9
|
/* @__PURE__ */ t(n, { strokeDasharray: "none", stroke: "gray", strokeWidth: 0.5, vertical: !0, horizontal: !0 }),
|
11
10
|
/* @__PURE__ */ t(l, { dataKey: "month", axisLine: !1, tickLine: !1, tick: { fontSize: 12 } }),
|
12
11
|
/* @__PURE__ */ t(h, { axisLine: !1, tickLine: !1, tick: { fontSize: 12 } }),
|
13
|
-
/* @__PURE__ */ t(f, { content: /* @__PURE__ */ t(
|
12
|
+
/* @__PURE__ */ t(f, { content: /* @__PURE__ */ t(c, {}) }),
|
14
13
|
Object.entries(i).map(([e, { color: r }]) => /* @__PURE__ */ t(
|
15
14
|
p,
|
16
15
|
{
|
@@ -24,5 +23,5 @@ const y = ({ data: o, config: i }) => /* @__PURE__ */ t(d, { config: i, classNam
|
|
24
23
|
))
|
25
24
|
] }) });
|
26
25
|
export {
|
27
|
-
|
26
|
+
k as AreaChart
|
28
27
|
};
|
package/Badge/Badge.mjs
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
2
|
-
import "
|
3
|
-
import {
|
4
|
-
|
5
|
-
|
6
|
-
return /* @__PURE__ */ t("div", { className: i(a({ variant: o }), r), ...m });
|
2
|
+
import { cn as a } from "@oneplatformdev/utils";
|
3
|
+
import { badgeVariants as i } from "./badgeVariants.mjs";
|
4
|
+
function p({ className: r, variant: o, ...m }) {
|
5
|
+
return /* @__PURE__ */ t("div", { className: a(i({ variant: o }), r), ...m });
|
7
6
|
}
|
8
7
|
export {
|
9
|
-
|
10
|
-
|
8
|
+
p as Badge,
|
9
|
+
i as badgeVariants
|
11
10
|
};
|
package/Calendar/Calendar.mjs
CHANGED
package/Checkbox/Checkbox.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CheckboxLabelProps, CheckboxProps } from './Checkbox.types
|
1
|
+
import { CheckboxLabelProps, CheckboxProps } from './Checkbox.types';
|
2
2
|
import * as React from 'react';
|
3
3
|
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
4
4
|
declare const CheckboxLabel: React.ForwardRefExoticComponent<CheckboxLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
package/Command/Command.mjs
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
2
2
|
import * as m from "react";
|
3
|
-
import "@radix-ui/react-dialog";
|
4
3
|
import { Command as o } from "cmdk";
|
5
4
|
import { Search as p } from "lucide-react";
|
6
5
|
import { cn as r } from "@oneplatformdev/utils";
|
@@ -17,7 +16,7 @@ const n = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t(
|
|
17
16
|
}
|
18
17
|
));
|
19
18
|
n.displayName = o.displayName;
|
20
|
-
const
|
19
|
+
const C = ({ children: e, ...a }) => /* @__PURE__ */ t(i, { ...a, children: /* @__PURE__ */ t(c, { className: "overflow-hidden p-0", children: /* @__PURE__ */ t(n, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), l = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ s("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
21
20
|
/* @__PURE__ */ t(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
22
21
|
/* @__PURE__ */ t(
|
23
22
|
o.Input,
|
@@ -99,7 +98,7 @@ const y = ({
|
|
99
98
|
y.displayName = "CommandShortcut";
|
100
99
|
export {
|
101
100
|
n as Command,
|
102
|
-
|
101
|
+
C as CommandDialog,
|
103
102
|
f as CommandEmpty,
|
104
103
|
g as CommandGroup,
|
105
104
|
l as CommandInput,
|
package/DataTable/DataTable.mjs
CHANGED
@@ -5,9 +5,8 @@ import { DropdownMenu as p, DropdownMenuTrigger as g, DropdownMenuContent as u,
|
|
5
5
|
import { Table as f, TableHeader as w, TableRow as t, TableHead as x, TableBody as b, TableCell as d } from "../Table/Table.mjs";
|
6
6
|
import { flexRender as a } from "@tanstack/react-table";
|
7
7
|
import { ChevronDown as D } from "lucide-react";
|
8
|
-
|
9
|
-
|
10
|
-
table: n,
|
8
|
+
const y = ({
|
9
|
+
table: r,
|
11
10
|
ToolBar: s,
|
12
11
|
tColumns: c = "Columns",
|
13
12
|
tNoResults: m = "No results"
|
@@ -22,12 +21,12 @@ const I = ({
|
|
22
21
|
" ",
|
23
22
|
/* @__PURE__ */ l(D, { className: "ml-2 h-4 w-4" })
|
24
23
|
] }) }),
|
25
|
-
/* @__PURE__ */ l(u, { align: "end", children:
|
24
|
+
/* @__PURE__ */ l(u, { align: "end", children: r.getAllColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ l(
|
26
25
|
C,
|
27
26
|
{
|
28
27
|
className: "capitalize",
|
29
28
|
checked: e.getIsVisible(),
|
30
|
-
onCheckedChange: (
|
29
|
+
onCheckedChange: (n) => e.toggleVisibility(!!n),
|
31
30
|
children: e.id
|
32
31
|
},
|
33
32
|
e.id
|
@@ -35,24 +34,24 @@ const I = ({
|
|
35
34
|
] })
|
36
35
|
] }),
|
37
36
|
/* @__PURE__ */ l("div", { className: "rounded-md border", children: /* @__PURE__ */ i(f, { children: [
|
38
|
-
/* @__PURE__ */ l(w, { children:
|
39
|
-
|
40
|
-
|
41
|
-
) },
|
42
|
-
/* @__PURE__ */ l(b, { children: (o =
|
37
|
+
/* @__PURE__ */ l(w, { children: r.getHeaderGroups().map((e) => /* @__PURE__ */ l(t, { children: e.headers.map((n) => /* @__PURE__ */ l(x, { children: n.isPlaceholder ? null : a(
|
38
|
+
n.column.columnDef.header,
|
39
|
+
n.getContext()
|
40
|
+
) }, n.id)) }, e.id)) }),
|
41
|
+
/* @__PURE__ */ l(b, { children: (o = r.getRowModel().rows) != null && o.length ? r.getRowModel().rows.map((e) => /* @__PURE__ */ l(
|
43
42
|
t,
|
44
43
|
{
|
45
44
|
"data-state": e.getIsSelected() && "selected",
|
46
|
-
children: e.getVisibleCells().map((
|
47
|
-
|
48
|
-
|
49
|
-
) },
|
45
|
+
children: e.getVisibleCells().map((n) => /* @__PURE__ */ l(d, { children: a(
|
46
|
+
n.column.columnDef.cell,
|
47
|
+
n.getContext()
|
48
|
+
) }, n.id))
|
50
49
|
},
|
51
50
|
e.id
|
52
51
|
)) : /* @__PURE__ */ l(t, { children: /* @__PURE__ */ l(
|
53
52
|
d,
|
54
53
|
{
|
55
|
-
colSpan:
|
54
|
+
colSpan: r.getAllColumns().length,
|
56
55
|
className: "h-24 text-center",
|
57
56
|
children: m
|
58
57
|
}
|
@@ -61,5 +60,5 @@ const I = ({
|
|
61
60
|
] });
|
62
61
|
};
|
63
62
|
export {
|
64
|
-
|
63
|
+
y as DataTable
|
65
64
|
};
|
package/Dropzone/Dropzone.mjs
CHANGED
@@ -4,7 +4,7 @@ import { useDropzone as O } from "react-dropzone";
|
|
4
4
|
import { Card as X } from "../Card/Card.mjs";
|
5
5
|
import { X as Y } from "lucide-react";
|
6
6
|
import { cn as f } from "@oneplatformdev/utils";
|
7
|
-
import { F as q, D as G } from "../DropzoneFilePreview-
|
7
|
+
import { F as q, D as G } from "../DropzoneFilePreview-Dhtv8F4u.js";
|
8
8
|
import { DefaultFileIcon as H, isFile as u, extractName as J } from "./DropzoneUtils.mjs";
|
9
9
|
import { DropzoneSinglePickPreview as K } from "./DropzoneSinglePickPreview.mjs";
|
10
10
|
const Q = j(
|
package/Dropzone/index.mjs
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { useState as
|
1
|
+
import { jsx as l, jsxs as d } from "react/jsx-runtime";
|
2
|
+
import { useState as m, useEffect as f } from "react";
|
3
3
|
import { File as s } from "lucide-react";
|
4
|
-
import "
|
5
|
-
import { isFile as l } from "./Dropzone/DropzoneUtils.mjs";
|
4
|
+
import { isFile as o } from "./Dropzone/DropzoneUtils.mjs";
|
6
5
|
import { cn as c } from "@oneplatformdev/utils";
|
7
|
-
const
|
6
|
+
const h = [
|
8
7
|
"application/msword",
|
9
8
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
10
9
|
"text/csv",
|
@@ -16,11 +15,11 @@ const j = [
|
|
16
15
|
"image/jpg",
|
17
16
|
"image/webp",
|
18
17
|
"image/gif"
|
19
|
-
],
|
20
|
-
const [t, a] =
|
18
|
+
], j = ({ item: e, styles: r }) => {
|
19
|
+
const [t, a] = m(null), p = o(e) && u.includes(e.type);
|
21
20
|
return f(() => {
|
22
21
|
let n = null;
|
23
|
-
if (
|
22
|
+
if (o(e) && p) {
|
24
23
|
const i = new FileReader();
|
25
24
|
return i.onloadend = () => a(i.result), i.readAsDataURL(e), () => a(null);
|
26
25
|
} else {
|
@@ -31,21 +30,21 @@ const j = [
|
|
31
30
|
a(null);
|
32
31
|
}
|
33
32
|
return () => a(null);
|
34
|
-
}, [e, p]), /* @__PURE__ */
|
33
|
+
}, [e, p]), /* @__PURE__ */ l(
|
35
34
|
"div",
|
36
35
|
{
|
37
36
|
className: c(
|
38
37
|
"w-32 h-32 border border-gray-300 rounded-md overflow-hidden flex items-center justify-center",
|
39
38
|
r == null ? void 0 : r.previewWraper
|
40
39
|
),
|
41
|
-
children: t ? /* @__PURE__ */
|
40
|
+
children: t ? /* @__PURE__ */ l(
|
42
41
|
"img",
|
43
42
|
{
|
44
43
|
src: t,
|
45
|
-
alt:
|
44
|
+
alt: o(e) ? e.name : "external-image",
|
46
45
|
className: c("w-full h-full object-cover", r == null ? void 0 : r.previewImage)
|
47
46
|
}
|
48
|
-
) : /* @__PURE__ */
|
47
|
+
) : /* @__PURE__ */ d(
|
49
48
|
"div",
|
50
49
|
{
|
51
50
|
className: c(
|
@@ -53,8 +52,8 @@ const j = [
|
|
53
52
|
r == null ? void 0 : r.previewFile
|
54
53
|
),
|
55
54
|
children: [
|
56
|
-
/* @__PURE__ */
|
57
|
-
|
55
|
+
/* @__PURE__ */ l(s, { className: "w-6 h-6" }),
|
56
|
+
o(e) ? /* @__PURE__ */ l("span", { className: "text-xs break-all", children: e.name }) : /* @__PURE__ */ l("span", { className: "text-xs break-all", children: e })
|
58
57
|
]
|
59
58
|
}
|
60
59
|
)
|
@@ -62,7 +61,7 @@ const j = [
|
|
62
61
|
);
|
63
62
|
};
|
64
63
|
export {
|
65
|
-
|
66
|
-
|
64
|
+
h as D,
|
65
|
+
j as F,
|
67
66
|
u as a
|
68
67
|
};
|
package/Form/Form.mjs
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
2
2
|
import * as s from "react";
|
3
|
-
import "@radix-ui/react-label";
|
4
3
|
import { Slot as F } from "@radix-ui/react-slot";
|
5
4
|
import { FormProvider as u, Controller as p, useFormContext as x } from "react-hook-form";
|
6
5
|
import { cn as a } from "@oneplatformdev/utils";
|
7
6
|
import { Label as I } from "../Label/Label.mjs";
|
8
7
|
import "../Label/labelVariants.mjs";
|
9
|
-
const
|
8
|
+
const M = u, f = s.createContext(
|
10
9
|
{}
|
11
|
-
),
|
10
|
+
), S = ({
|
12
11
|
...e
|
13
12
|
}) => /* @__PURE__ */ i(f.Provider, { value: { name: e.name }, children: /* @__PURE__ */ i(p, { ...e }) }), d = () => {
|
14
13
|
const e = s.useContext(f), o = s.useContext(l), { getFieldState: r, formState: t } = x(), m = r(e.name, t);
|
@@ -85,10 +84,10 @@ const w = s.forwardRef(({ className: e, children: o, ...r }, t) => {
|
|
85
84
|
});
|
86
85
|
w.displayName = "FormMessage";
|
87
86
|
export {
|
88
|
-
|
87
|
+
M as Form,
|
89
88
|
v as FormControl,
|
90
89
|
N as FormDescription,
|
91
|
-
|
90
|
+
S as FormField,
|
92
91
|
C as FormItem,
|
93
92
|
g as FormLabel,
|
94
93
|
w as FormMessage,
|
@@ -1,14 +1,13 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
2
|
-
import { FormField as
|
3
|
-
|
4
|
-
const h = (e) => {
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
2
|
+
import { FormField as d, FormItem as i, FormLabel as F, FormMessage as p } from "./Form.mjs";
|
3
|
+
const b = (e) => {
|
5
4
|
const { form: n, name: m, label: o, render: t, containerProps: l = {}, ...s } = e;
|
6
5
|
return /* @__PURE__ */ r(
|
7
|
-
|
6
|
+
d,
|
8
7
|
{
|
9
8
|
control: n.control,
|
10
9
|
name: m,
|
11
|
-
render: (c) => /* @__PURE__ */ i
|
10
|
+
render: (c) => /* @__PURE__ */ a(i, { ...l, children: [
|
12
11
|
!!o && /* @__PURE__ */ r(F, { children: o }),
|
13
12
|
t(c),
|
14
13
|
/* @__PURE__ */ r(p, {})
|
@@ -18,5 +17,5 @@ const h = (e) => {
|
|
18
17
|
);
|
19
18
|
};
|
20
19
|
export {
|
21
|
-
|
20
|
+
b as FormRenderControl
|
22
21
|
};
|
@@ -1,24 +1,23 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
|
-
import "
|
3
|
-
import {
|
4
|
-
import { FormRenderControl as h } from "../Form/FormRenderControl.mjs";
|
2
|
+
import { FormControl as h } from "../Form/Form.mjs";
|
3
|
+
import { FormRenderControl as p } from "../Form/FormRenderControl.mjs";
|
5
4
|
import { CheckboxLabel as s } from "../Checkbox/Checkbox.mjs";
|
6
|
-
const
|
7
|
-
const { form: c, label: a, name: l, onCheckedChange: o, ...m } =
|
5
|
+
const i = (t) => {
|
6
|
+
const { form: c, label: a, name: l, onCheckedChange: o, ...m } = t;
|
8
7
|
return /* @__PURE__ */ e(
|
9
|
-
|
8
|
+
p,
|
10
9
|
{
|
11
10
|
form: c,
|
12
11
|
name: l,
|
13
|
-
render: ({ field: r }) => /* @__PURE__ */ e(
|
12
|
+
render: ({ field: r }) => /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(
|
14
13
|
s,
|
15
14
|
{
|
16
15
|
...r,
|
17
16
|
...m,
|
18
17
|
label: a,
|
19
18
|
checked: r.value || !1,
|
20
|
-
onCheckedChange: (
|
21
|
-
r.onChange(
|
19
|
+
onCheckedChange: (n) => {
|
20
|
+
r.onChange(n), o == null || o(n);
|
22
21
|
}
|
23
22
|
}
|
24
23
|
) }),
|
@@ -27,5 +26,5 @@ const k = (n) => {
|
|
27
26
|
);
|
28
27
|
};
|
29
28
|
export {
|
30
|
-
|
29
|
+
i as FormCheckbox
|
31
30
|
};
|
@@ -1,20 +1,19 @@
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
2
|
-
import { FormControl as
|
3
|
-
import { FormRenderControl as
|
4
|
-
import { Combobox as
|
5
|
-
|
6
|
-
const
|
7
|
-
const { form: n, label: t, name: e, ...p } = m;
|
2
|
+
import { FormControl as b } from "../Form/Form.mjs";
|
3
|
+
import { FormRenderControl as p } from "../Form/FormRenderControl.mjs";
|
4
|
+
import { Combobox as a } from "../Combobox/Combobox.mjs";
|
5
|
+
const x = (m) => {
|
6
|
+
const { form: n, label: e, name: t, ...C } = m;
|
8
7
|
return /* @__PURE__ */ o(
|
9
|
-
|
8
|
+
p,
|
10
9
|
{
|
11
10
|
form: n,
|
12
|
-
label:
|
13
|
-
name:
|
14
|
-
render: ({ field: r }) => /* @__PURE__ */ o(
|
15
|
-
|
11
|
+
label: e,
|
12
|
+
name: t,
|
13
|
+
render: ({ field: r }) => /* @__PURE__ */ o(b, { children: /* @__PURE__ */ o(
|
14
|
+
a,
|
16
15
|
{
|
17
|
-
...
|
16
|
+
...C,
|
18
17
|
...r,
|
19
18
|
onChange: r.onChange
|
20
19
|
}
|
@@ -23,5 +22,5 @@ const c = (m) => {
|
|
23
22
|
);
|
24
23
|
};
|
25
24
|
export {
|
26
|
-
|
25
|
+
x as FormCombobox
|
27
26
|
};
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
|
-
import { DatePicker as
|
3
|
-
import { FormControl as
|
2
|
+
import { DatePicker as l } from "../DatePicker/DatePicker.mjs";
|
3
|
+
import { FormControl as p } from "../Form/Form.mjs";
|
4
4
|
import { FormRenderControl as s } from "../Form/FormRenderControl.mjs";
|
5
|
-
|
6
|
-
const k = (m) => {
|
5
|
+
const h = (m) => {
|
7
6
|
const { form: n, name: a, label: c, onDateChange: r, ...i } = m;
|
8
7
|
return /* @__PURE__ */ e(
|
9
8
|
s,
|
@@ -11,8 +10,8 @@ const k = (m) => {
|
|
11
10
|
form: n,
|
12
11
|
name: a,
|
13
12
|
label: c,
|
14
|
-
render: ({ field: o }) => /* @__PURE__ */ e(
|
15
|
-
|
13
|
+
render: ({ field: o }) => /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
|
14
|
+
l,
|
16
15
|
{
|
17
16
|
...o,
|
18
17
|
...i,
|
@@ -26,5 +25,5 @@ const k = (m) => {
|
|
26
25
|
);
|
27
26
|
};
|
28
27
|
export {
|
29
|
-
|
28
|
+
h as FormDatePicker
|
30
29
|
};
|
@@ -1,20 +1,19 @@
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
2
2
|
import { FormControl as a } from "../Form/Form.mjs";
|
3
|
-
import { FormRenderControl as
|
4
|
-
import { Dropzone as
|
5
|
-
|
6
|
-
const F = (n) => {
|
3
|
+
import { FormRenderControl as l } from "../Form/FormRenderControl.mjs";
|
4
|
+
import { Dropzone as f } from "../Dropzone/Dropzone.mjs";
|
5
|
+
const h = (n) => {
|
7
6
|
const { form: e, label: m, name: t, ...p } = n;
|
8
7
|
return /* @__PURE__ */ o(
|
9
|
-
|
8
|
+
l,
|
10
9
|
{
|
11
10
|
form: e,
|
12
11
|
label: m,
|
13
12
|
name: t,
|
14
|
-
render: ({ field: r }) => /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(
|
13
|
+
render: ({ field: r }) => /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(f, { ...p, ...r, onChangeValue: r.onChange }) })
|
15
14
|
}
|
16
15
|
);
|
17
16
|
};
|
18
17
|
export {
|
19
|
-
|
18
|
+
h as FormDropzone
|
20
19
|
};
|
package/FormInput/FormInput.mjs
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
2
2
|
import { FormControl as l } from "../Form/Form.mjs";
|
3
|
-
import { FormRenderControl as
|
4
|
-
import { Input as
|
5
|
-
|
6
|
-
const d = (m) => {
|
3
|
+
import { FormRenderControl as u } from "../Form/FormRenderControl.mjs";
|
4
|
+
import { Input as a } from "../Input/Input.mjs";
|
5
|
+
const F = (m) => {
|
7
6
|
const { form: t, label: e, name: n, ...p } = m;
|
8
7
|
return /* @__PURE__ */ r(
|
9
|
-
|
8
|
+
u,
|
10
9
|
{
|
11
10
|
form: t,
|
12
11
|
name: n,
|
13
12
|
label: e,
|
14
13
|
render: ({ field: o }) => /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
|
15
|
-
|
14
|
+
a,
|
16
15
|
{
|
17
16
|
...o,
|
18
17
|
value: o.value || "",
|
@@ -23,5 +22,5 @@ const d = (m) => {
|
|
23
22
|
);
|
24
23
|
};
|
25
24
|
export {
|
26
|
-
|
25
|
+
F as FormInput
|
27
26
|
};
|
package/FormRadio/FormRadio.mjs
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
|
-
import "
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import { Radio as f } from "../Radio/Radio.mjs";
|
2
|
+
import { FormControl as t, FormItem as F } from "../Form/Form.mjs";
|
3
|
+
import { FormRenderControl as f } from "../Form/FormRenderControl.mjs";
|
4
|
+
import { Radio as i } from "../Radio/Radio.mjs";
|
6
5
|
const b = (n) => {
|
7
6
|
const {
|
8
7
|
form: u,
|
@@ -10,27 +9,27 @@ const b = (n) => {
|
|
10
9
|
label: c,
|
11
10
|
onValueChange: m,
|
12
11
|
value: h,
|
13
|
-
defaultValue:
|
12
|
+
defaultValue: s,
|
14
13
|
renderOption: a,
|
15
|
-
...
|
14
|
+
...v
|
16
15
|
} = n;
|
17
16
|
return /* @__PURE__ */ e(
|
18
|
-
|
17
|
+
f,
|
19
18
|
{
|
20
19
|
form: u,
|
21
20
|
name: d,
|
22
21
|
label: c,
|
23
22
|
render: ({ field: o }) => /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(
|
24
|
-
|
23
|
+
i,
|
25
24
|
{
|
26
25
|
...o,
|
27
|
-
...
|
28
|
-
defaultValue:
|
26
|
+
...v,
|
27
|
+
defaultValue: s || o.value,
|
29
28
|
value: h || o.value,
|
30
29
|
onValueChange: (r) => {
|
31
30
|
o.onChange(r), m == null || m(r);
|
32
31
|
},
|
33
|
-
renderOption: (r, l) => /* @__PURE__ */ e(
|
32
|
+
renderOption: (r, l) => /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(t, { children: (a == null ? void 0 : a(r, l)) || /* @__PURE__ */ e(l, { ...r }) }) }, r.value)
|
34
33
|
}
|
35
34
|
) })
|
36
35
|
}
|
@@ -3,21 +3,20 @@ import { FormControl as f } from "../Form/Form.mjs";
|
|
3
3
|
import { FormRenderControl as d } from "../Form/FormRenderControl.mjs";
|
4
4
|
import "../Select/SelectRoot.mjs";
|
5
5
|
import { Select as g } from "../Select/Select.mjs";
|
6
|
-
|
7
|
-
const b = (m) => {
|
6
|
+
const S = (n) => {
|
8
7
|
const {
|
9
|
-
form:
|
8
|
+
form: m,
|
10
9
|
label: i,
|
11
10
|
name: p,
|
12
11
|
options: l = [],
|
13
12
|
onChange: r,
|
14
13
|
containerProps: c,
|
15
14
|
...s
|
16
|
-
} =
|
15
|
+
} = n;
|
17
16
|
return /* @__PURE__ */ e(
|
18
17
|
d,
|
19
18
|
{
|
20
|
-
form:
|
19
|
+
form: m,
|
21
20
|
name: p,
|
22
21
|
label: i,
|
23
22
|
containerProps: c,
|
@@ -37,5 +36,5 @@ const b = (m) => {
|
|
37
36
|
);
|
38
37
|
};
|
39
38
|
export {
|
40
|
-
|
39
|
+
S as FormSelect
|
41
40
|
};
|
@@ -1,28 +1,27 @@
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
2
|
-
import { FormControl as
|
3
|
-
import { FormRenderControl as
|
4
|
-
import "
|
5
|
-
|
6
|
-
const
|
7
|
-
const { form: t, label: m, name: n, containerProps: a, ...p } = e;
|
2
|
+
import { FormControl as p } from "../Form/Form.mjs";
|
3
|
+
import { FormRenderControl as i } from "../Form/FormRenderControl.mjs";
|
4
|
+
import { Textarea as s } from "../Textarea/Textarea.mjs";
|
5
|
+
const F = (e) => {
|
6
|
+
const { form: t, label: m, name: n, containerProps: a, ...l } = e;
|
8
7
|
return /* @__PURE__ */ r(
|
9
|
-
|
8
|
+
i,
|
10
9
|
{
|
11
10
|
form: t,
|
12
11
|
name: n,
|
13
12
|
label: m,
|
14
13
|
containerProps: a,
|
15
|
-
render: ({ field: o }) => /* @__PURE__ */ r(
|
14
|
+
render: ({ field: o }) => /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(
|
16
15
|
s,
|
17
16
|
{
|
18
17
|
...o,
|
19
18
|
value: o.value || "",
|
20
|
-
...
|
19
|
+
...l
|
21
20
|
}
|
22
21
|
) })
|
23
22
|
}
|
24
23
|
);
|
25
24
|
};
|
26
25
|
export {
|
27
|
-
|
26
|
+
F as FormTextarea
|
28
27
|
};
|